![](/img/trans.png)
[英]Touch on SwitchCompat widget doesn't change SwitchPreference value
[英]can't change the textsize of the thumb of SwitchCompat widget
我很難改變開關緊湊型拇指的文字大小。
這是我的布局:
<android.support.v7.widget.SwitchCompat
android:id="@+id/switch_compat2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:checked="true"
android:switchTextAppearance="@style/MyStyle"
android:text="SwitchCompat (SDK v7+)"
app:showText="true" />
和風格:
<style name="MyStyle">
<item name="android:textColor">#229922</item>
<item name="android:textSize">10sp</item>
</style>
然而,無論我在“MyStyle”上做什么,開關總是如下所示:
理想情況下,我希望它看起來像這樣:
任何人都願意分享他們的drawables我可以嘗試匹配上面的圖像?
我正在調查這些線程但沒有正確匹配。 它讓它看起來更糟。
謝謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.