作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我很难更改 switch 紧凑型缩略图的文本大小。
这是我的布局:
<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”上做什么,开关总是看起来像这样:
理想情况下,我希望它看起来像这样:
任何人都愿意分享他们的可绘制对象,我可以尝试匹配上面的图像吗?
我正在研究这些话题,但没有正确匹配。这让它看起来更糟。
How to change the size of a Switch Widget
谢谢!
最佳答案
关于android - 无法更改 SwitchCompat 小部件的缩略图的文本大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36364153/
我有一个具有可变数量子元素的固定大小的 div。我不知道 children 的大小。目标是缩小它们以适合父级。 例子: .parent { width: 100px; height: 100p
我是一名优秀的程序员,十分优秀!