[英]Using ListPreference without the Cancel button
<ListPreference
android:title="Question?"
android:summary="%s"
android:entries="@array/BS"
android:entryValues="@array/BS"
android:defaultValue="0"
android:key="BS"
></ListPreference>
我得到了这个 ListPreference 但它有一个我并不真正想要的取消按钮,它占用了太多空间。 我当然可以将它设置为白色,但我宁愿让它消失。
自己找到了一个答案:
<ListPreference
android:title="Question?"
android:summary="%s"
android:entries="@array/BS"
android:entryValues="@array/BS"
android:defaultValue="0"
android:key="BS"
android:negativeButtonText=""
></ListPreference>
这实际上使整个盒子变小了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.