【发布时间】:2013-07-22 02:11:05
【问题描述】:
伙计们,我有一个按钮,如下图
我想改变文本与 drawable 之间的距离。怎么骗这个?
这是我的按钮的 xml 代码
<Button
android:id="@+id/ButtonCancel"
style="@style/CAGButton"
android:drawableLeft="@drawable/selector_ic_cancel"
android:text="@string/layer_button_cancel" />
这是 style.xml 中的 CAGButton
<style name="CAGButton" parent="@android:style/Widget.Button">
<item name="android:drawablePadding">3dip</item>
<item name="android:textColor">@color/cag_brown</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_weight">1</item>
<item name="android:background">@drawable/selector_button"</item>
</style>
好的,谢谢。 :)
【问题讨论】:
-
你有解决这个问题的办法吗?
-
嗨@gZerone 我已经发布了我的答案。你可以去看看。
-
感谢 RR12。我得到了你的解决方案:)