简体   繁体   English

旋转器默认实现什么布局?

[英]What layout do spinners implement by default?

I have a layout with multiple spinners. 我有一个带有多个微调器的布局。 Some have adapters while others get their contents from string arrays. 一些有适配器,而另一些从字符串数组获取其内容。 The ones with the adapters implement the simple_list_item_1 layout, but this causes a different look than the other spinners and leads to formatting issues on the page. 带有适配器的那些实现了simple_list_item_1布局,但是这会导致与其他微调器不同的外观并导致页面上的格式问题。 How does one find out, or does anyone know what layout a spinner uses by default? 如何找出,或者有人知道微调器默认使用什么布局?

A spinner's layout is dependent on the layout passed to it's adapter. 微调器的布局取决于传递给它的适配器的布局。

It looks like simple_list_item_1 is a simple TextView with padding: 看起来simple_list_item_1是一个带填充的简单TextView:

Here's the source xml layout: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/simple_list_item_1.xml 这是源xml布局: https//github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/simple_list_item_1.xml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM