Android:如何更改复选框大小? [英] Android: How to change CheckBox size?

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

问题描述

解决方案

我想要使CheckBox有点小/更大,设置相关的可绘制项并将其设置在复选框中:

 < CheckBox 
android:layout_width =wrap_content
android:layout_height =wrap_content
android:text =new checkbox
android:background =@ drawable / my_checkbox_background
android:button =@ drawable / my_checkbox />

诀窍是如何设置可绘制项。 这是一个很好的教程


I would like to make CheckBox a bit smaller/bigger, how can I do this?

解决方案

You just need to set the related drawables and set them in the checkbox:

<CheckBox 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content"
    android:text="new checkbox" 
    android:background="@drawable/my_checkbox_background"
    android:button="@drawable/my_checkbox" />

The trick is on how to set the drawables. Here's a good tutorial about this.

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

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