Android怎么让RadioButton图片居中显示
来源:互联网 发布:tp框架非法数据对象 编辑:程序博客网 时间:2024/05/01 20:46
通过使用RadioGroup
的button属性后
怎么让radiobutton 显示的图片居中.使用android:backgroud方法图片会变形。无奈使用android:drawableTop.但是该图片是靠右侧的。
而网上说的
android:button="@null"
android:drawableTop="@drawable/rate_selector" 这个方法试过了,没用
的button属性后
怎么让radiobutton 显示的图片居中.使用android:backgroud方法图片会变形。无奈使用android:drawableTop.但是该图片是靠右侧的。
而网上说的
android:button="@null"
android:drawableTop="@drawable/rate_selector" 这个方法试过了,没用
如下面的例子:
<RadioButton android:id="@+id/radio_button3" style="@style/main_tab_bottom" android:layout_marginTop="2.0dip" android:drawableTop="@drawable/icon_4_n" android:tag="radio_button3" android:text="@string/settingtitle" />
<style name="main_tab_bottom"> <item name="android:textSize">@dimen/bottom_tab_font_size</item> <item name="android:textColor">#ffffffff</item> <item name="android:ellipsize">marquee</item> <item name="android:gravity">center_horizontal</item> <item name="android:background">@drawable/home_btn_bg</item> <item name="android:paddingTop">@dimen/bottom_tab_padding_up</item> <item name="android:layout_width">fill_parent</item> <item name="android:layout_height">wrap_content</item> <item name="android:button">@null</item> <item name="android:singleLine">true</item> <item name="android:drawablePadding">@dimen/bottom_tab_padding_drawable</item> <item name="android:layout_weight">1.0</item> </style>
其实方法很简单:
添加个背景图片就搞定了。
0 0
- Android怎么让RadioButton图片居中显示
- Android radioButton只设置图片是居中显示
- Android RadioButton左边图片不能居中显示问题
- android 自定义RadioButton 实现图标居中显示
- 如何让图片居中显示。让图片只适应居中。
- RadioButton 图片居中问题
- swing中怎么让窗口居中显示
- 如何让图片水平 居中显示
- 让图片居中显示(PHP)
- Android studio 图片显示过大 RadioButton
- Android里面怎么让界面居中
- RadioButton只有图片设置居中
- C# Winform 怎么让按钮在Panel里居中显示
- 自定义控件让TextView(Radiobutton)、Button的drawableLeft和drawableRight与文本一起居中显示
- 怎么让DIV居中
- Android DrawableTextView图片文字居中显示
- 一个td内如何让文字图片同时居中显示?
- div+css中如何让图片垂直居中显示
- [数据结构]单链表逆置
- 驾培网程序日志
- 各个变量链接时放在哪里
- 如何在excel和word插入带方框的对号
- Vmware vSphere 5.0系列教程之四 vSphere网络原理及vSwitch简介
- Android怎么让RadioButton图片居中显示
- 使用Strophe连接xmpp,轻松构建web即时聊天工具
- Android五大布局对象---FrameLayout,LinearLayout ,AbsoluteLayout,RelativeLayout,TableLayout.
- Java正则表达式入门
- HDU 4389 X mod f(x)
- Python 参数传递之引用传递
- Vmware vSphere 5.0系列教程之五 存储简介及配置openfiler存储
- 【Spring】scope:"singleton"与"prototype"学习记录
- Redis在windows下的安装使用