文字重叠图标I有一个带图标的切换按钮和如上所示的文本(在与绿色箭头指出)。我测试过的大多数设备都工作得很好。
只要与迄今2个三星片剂(三星GalaxyTab和一个10英寸的Galaxy Tab)出现这个问题,其中文本覆盖的图标(在与红色箭头指出),如下所示。
我已经尝试了所有aligments,填充和这样没有工作的结果。
的网络和SO出奇的没有拿出一个解决方案,也没有问题。
这是我使用的是现在的切换按钮的XML。它被包裹其中包括defintions成的RelativeLayout:
<ToggleButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_subscriptions"
android:id="@+id/subscription_button"
android:textOff="@string/btn_subscribe"
android:textOn="@string/btn_subscribed"
android:button="@drawable/star_selector"
android:background="@android:color/transparent"
android:textColor="@color/textColor"
android:layout_toLeftOf="@+id/navigation_next_item"
android:layout_alignBottom="@+id/channel_headline_image"
/>
的@drawable/star_selector
具有以下定义:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="false" android:drawable="@drawable/ic_like" />
<item android:state_checked="true" android:drawable="@drawable/ic_liked_fav" />
</selector>
谢谢你指着我的方向是正确任何提示!
谢谢工程。 – OpenHaus