mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Api 21 fix (#3187)
This commit is contained in:
@ -283,7 +283,7 @@ export class SegmentedBarStyler implements style.Styler {
|
|||||||
let vg = <android.view.ViewGroup>tabHost.getTabWidget().getChildTabViewAt(tabIndex);
|
let vg = <android.view.ViewGroup>tabHost.getTabWidget().getChildTabViewAt(tabIndex);
|
||||||
|
|
||||||
var backgroundDrawable = vg.getBackground();
|
var backgroundDrawable = vg.getBackground();
|
||||||
if (android.os.Build.VERSION.SDK_INT >= 21 && backgroundDrawable && types.isFunction(backgroundDrawable.setColorFilter)) {
|
if (android.os.Build.VERSION.SDK_INT > 21 && backgroundDrawable && types.isFunction(backgroundDrawable.setColorFilter)) {
|
||||||
backgroundDrawable.setColorFilter(newValue, android.graphics.PorterDuff.Mode.SRC_IN);
|
backgroundDrawable.setColorFilter(newValue, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
} else {
|
} else {
|
||||||
let stateDrawable = new android.graphics.drawable.StateListDrawable();
|
let stateDrawable = new android.graphics.drawable.StateListDrawable();
|
||||||
|
Reference in New Issue
Block a user