Change the size of android Checkbox

邮差的信 提交于 2019-12-19 11:29:41

问题


In my Android application I need to change the size of the android checkbox. I searched and understood it can not be done by simply changing the properties. I found the THIS LINK but can't really figure out what exactly have to do. [Can't find this link, "android-sdk-windows-1.0_r2\tools\lib\res\default\values\themes.xml"].

Can Someone please help me to achieve this??? Thanks


回答1:


The path for themes.xml and styles.xml is changed from the given one to android-sdk-windows\platforms\android-8\data\res\values (android-8 is for API-level 8). The drawable btn_check.xml is available at android-sdk-windows\platforms\android-8\data\res\drawable, while the other drawable components are available at respective hdpi / mdpi folders.

2) You simply need to include the respective drawables of the checkbox in different states (i.e. focused, pressed, checked, or normal), and a drawable for the background as well (often the nine-patch file given in the link). Include these in the respective xml to specify the looks of the checkbox as given in the link, and include that xml in the android:button and android:background attributes of your checkbox. That should do it all...! :)



来源:https://stackoverflow.com/questions/7242163/change-the-size-of-android-checkbox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!