android - make v7.widget.SwitchCompat appearance like native Switch widget -



android - make v7.widget.SwitchCompat appearance like native Switch widget -

i tried new v7.widget.switchcompat , appearance way different expect. did new v7.widget.switchcompat supports style view native switch button?

switch on 4.0+

if want create app uses switch on 4.0+ devices need declare 2 layouts. first in layout-v14 what's used on ics devices. in layout folder create utilize of checkbox.

in code create utilize of compoundbutton class when getting/setting info switch or checkbox. you'll find compoundbutton works this.

or can utilize library this: https://github.com/bod/android-switch-backport

android

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -