@nativescript-community/ui-material-ripple
Advanced tools
Comparing version 7.1.4 to 7.2.0
{ | ||
"name": "@nativescript-community/ui-material-ripple", | ||
"version": "7.1.4", | ||
"version": "7.2.0", | ||
"description": "The Material Design Ripple component provides a radial action in the form of a visual ripple expanding outward from the user's touch. Ripple is a visual form of feedback for touch events providing users a clear signal that an element is being touched.", | ||
@@ -49,5 +49,5 @@ "main": "./ripple", | ||
"dependencies": { | ||
"@nativescript-community/ui-material-core": "^7.1.4" | ||
"@nativescript-community/ui-material-core": "^7.2.0" | ||
}, | ||
"gitHead": "8052d595674b39c5d2369b44c29823ad09eb8a83" | ||
"gitHead": "6f0934230139071de6eb0579837644924313334d" | ||
} |
@@ -8,3 +8,3 @@ import { RippleBase } from './ripple-common'; | ||
getRippleColor(): any; | ||
setRippleDrawable(view: android.view.View, radius?: number): void; | ||
setRippleDrawable(view: android.view.View, topLeftRadius?: number, topRightRadius?: number, bottomRightRadius?: number, bottomLeftRadius?: number): void; | ||
} |
import { getRippleColor, rippleColorProperty, themer } from '@nativescript-community/ui-material-core'; | ||
import { Background, Color, backgroundInternalProperty } from '@nativescript/core'; | ||
import { createRippleDrawable, getAttrColor, getColorStateList, isPostLollipopMR1, isPostMarshmallow } from '@nativescript-community/ui-material-core/android/utils'; | ||
import { createRippleDrawable, getColorStateList, isPostLollipopMR1, isPostMarshmallow } from '@nativescript-community/ui-material-core/android/utils'; | ||
import { Background, Color, Length, backgroundInternalProperty } from '@nativescript/core'; | ||
import { RippleBase } from './ripple-common'; | ||
@@ -9,3 +9,3 @@ let MDStackLayout; | ||
if (!MDStackLayout) { | ||
if (isPostLollipopMR1()) { | ||
if (isPostLollipopMR1) { | ||
MDStackLayout = org.nativescript.widgets.StackLayout; | ||
@@ -178,6 +178,6 @@ } | ||
} | ||
setRippleDrawable(view, radius = 0) { | ||
setRippleDrawable(view, topLeftRadius = 0, topRightRadius = 0, bottomRightRadius = 0, bottomLeftRadius = 0) { | ||
if (!this.rippleDrawable) { | ||
this.rippleDrawable = createRippleDrawable(this.getRippleColor(), radius); | ||
if (isPostMarshmallow()) { | ||
this.rippleDrawable = createRippleDrawable(this.getRippleColor(), topLeftRadius, topRightRadius, bottomRightRadius, bottomLeftRadius); | ||
if (isPostMarshmallow) { | ||
view.setForeground(this.rippleDrawable); | ||
@@ -189,6 +189,6 @@ } | ||
if (!this.rippleDrawable) { | ||
this.setRippleDrawable(this.nativeViewProtected); | ||
this.setRippleDrawable(this.nativeViewProtected, Length.toDevicePixels(this.style.borderTopLeftRadius), Length.toDevicePixels(this.style.borderTopRightRadius), Length.toDevicePixels(this.style.borderBottomRightRadius), Length.toDevicePixels(this.style.borderBottomLeftRadius)); | ||
} | ||
else { | ||
if (isPostLollipopMR1()) { | ||
if (isPostLollipopMR1) { | ||
this.rippleDrawable.setColor(getColorStateList(color.android)); | ||
@@ -195,0 +195,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43916
25
379