更改Android的复选框的大小 [英] Change the size of android Checkbox

查看:193
本文介绍了更改Android的复选框的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid应用程序,我需要改变的android复选框的大小。我搜索并理解它不能被简单地更改属性进行。我发现href="http://www.anddev.org/tutorial_change_look_of_checkbox-t4553.html" rel="nofollow">此链接却无法真正弄清楚到底有没有做

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

推荐答案

有关的themes.xml和styles.xml的路径是从给定的一个改为 Android的SDK-WINDOWS \平台\ android- 8 \ DATA \水库\值(机器人-8是API级别8)。 可绘制的btn_check.xml可在 Android的SDK-WINDOWS \平台\ Android为8 \ DATA \水库\绘制,而其他绘制组件可在各自的华电国际/ MDPI文件夹。

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)您只需要包括在不同状态下的复选框各自可绘制(即突出重点,pressed,检查,或正常),以及绘制的背景,以及(往往是九补丁文件中给出的在链接)。 包括那些在相应的XML指定为在链接中给出的复选框的外观,并且包括XML的安卓按钮机器人:您的复选框的背景属性。这应该做到这一切?! :)

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...! :)

这篇关于更改Android的复选框的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆