Android 5.0: extract new Switch style attributes
Switch_showText specifies whether the on/off text is shown in the thumb and Switch_splitTrack specifies whether the track is clipped underneath the thumb. Change-Id: I03fc6b799fe714e7b6e604328901c8c5a418ca6e Reviewed-by: BogDan Vatra <bogdan@kde.org>bb10
parent
3d70925ee5
commit
d9715108c1
|
|
@ -1544,6 +1544,11 @@ public class ExtractStyle {
|
|||
json.put("Switch_switchPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_switchPadding"), 0));
|
||||
json.put("Switch_thumbTextPadding", a.getDimensionPixelSize(getField(styleableClass, "Switch_thumbTextPadding"), 0));
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
json.put("Switch_showText", a.getBoolean(getField(styleableClass, "Switch_showText"), true));
|
||||
json.put("Switch_splitTrack", a.getBoolean(getField(styleableClass, "Switch_splitTrack"), false));
|
||||
}
|
||||
|
||||
a.recycle();
|
||||
jsonWriter.name(styleName).value(json);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue