File tree Expand file tree Collapse file tree 5 files changed +18
-1
lines changed
Expand file tree Collapse file tree 5 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,10 @@ export class ActionBar extends ActionBarBase {
189189 this . update ( ) ;
190190 }
191191
192+ override get needsNativeDrawableFill ( ) : boolean {
193+ return true ;
194+ }
195+
192196 public update ( ) {
193197 if ( ! this . nativeViewProtected ) {
194198 return ;
Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ export class Button extends ButtonBase {
106106 }
107107 }
108108
109+ override get needsNativeDrawableFill ( ) : boolean {
110+ return true ;
111+ }
112+
109113 [ minWidthProperty . getDefault ] ( ) : CoreTypes . LengthType {
110114 const dips = org . nativescript . widgets . ViewHelper . getMinWidth ( this . nativeViewProtected ) ;
111115
Original file line number Diff line number Diff line change @@ -1134,7 +1134,8 @@ export class View extends ViewCommon {
11341134 nativeView . setBackground ( backgroundDrawable ) ;
11351135 }
11361136
1137- if ( backgroundDrawable ) {
1137+ // Apply color to drawables when there is the need to maintain visual things like button ripple effect
1138+ if ( this . needsNativeDrawableFill && backgroundDrawable ) {
11381139 backgroundDrawable . mutate ( ) ;
11391140
11401141 AndroidHelper . setDrawableColor ( backgroundColor , backgroundDrawable ) ;
Original file line number Diff line number Diff line change @@ -781,6 +781,10 @@ export abstract class View extends ViewCommon {
781781 * @private
782782 */
783783 isLayoutRequired : boolean ;
784+ /**
785+ * @private
786+ */
787+ get needsNativeDrawableFill ( ) : boolean ;
784788 /**
785789 * @private
786790 */
Original file line number Diff line number Diff line change @@ -984,6 +984,10 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
984984 return true ;
985985 }
986986
987+ get needsNativeDrawableFill ( ) : boolean {
988+ return false ;
989+ }
990+
987991 public measure ( widthMeasureSpec : number , heightMeasureSpec : number ) : void {
988992 this . _setCurrentMeasureSpecs ( widthMeasureSpec , heightMeasureSpec ) ;
989993 }
You can’t perform that action at this time.
0 commit comments