大佬教程收集整理的这篇文章主要介绍了Android Switch Widget:设置android:track会导致拇指和曲目不显示,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
只需应用拇指,这是我的代码:
<com.blahblahblah.blah.CustomSwitch android:id="@+id/switch_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textOff="Off" android:textOn="On" android:text="Something Awesome" android:textColor="@android:color/black" android:thumb="@drawable/custom_switch_thumb" />
以下是预览窗口中的内容:
并应用跟踪:
<com.blahblahblah.blah.CustomSwitch android:id="@+id/switch_1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textOff="Off" android:textOn="On" android:text="Something Awesome" android:textColor="@android:color/black" android:track="@color/track_color" />
应用了轨道的预览窗口:
不工作(小部件在那里,我可以与它进行交互,但我看不到它,它是隐藏的):
<shape xmlns:android="http://scheR_5_11845@as.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/black_50" /> </shape>
工作(不是添加的< size>):
<shape xmlns:android="http://scheR_5_11845@as.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/black_50" /> <size android:width="56dp" android:height="20dp" /> </shape>
以上是大佬教程为你收集整理的Android Switch Widget:设置android:track会导致拇指和曲目不显示全部内容,希望文章能够帮你解决Android Switch Widget:设置android:track会导致拇指和曲目不显示所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。