Use setColorFilter on post-21 ActionBars only

This commit is contained in:
Rossen Hristov
2016-11-07 14:12:02 +02:00
parent 45578430ac
commit d674d806aa
2 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,6 @@
</ActionBar>
</Page.actionBar>
<StackLayout>
<Button text="go to cleared page" tap="navigate"/>
<Button text="go to cleared page" tap="navigate" style="background-color: green;"/>
</StackLayout>
</Page>

View File

@ -39,7 +39,9 @@ export module ad {
function isSetColorFilterOnlyWidget(nativeView: android.view.View): boolean {
return (
nativeView instanceof android.widget.Button ||
nativeView instanceof android.support.v7.widget.Toolbar
(nativeView instanceof android.support.v7.widget.Toolbar
&& getSDK() >= 21 // There is an issue with the DrawableContainer which was fixed for API version 21 and above: https://code.google.com/p/android/issues/detail?id=60183
)
);
}