【问题标题】:Apply style to a unique spinner将样式应用于独特的微调器
【发布时间】:2013-07-30 12:12:07
【问题描述】:

我想禁用将项目分隔为微调器的默认分隔器。

我试图创造自己的风格

<style name="MyDropDownWithoutDivider" parent="Widget.Sherlock.TextView.SpinnerItem">
    <item name="android:dividerHeight">0dp</item>
    <item name="android:divider">@null</item>
    <item name="android:listSelector">@drawable/selector_action_bar</item>
</style>

并将其应用于我的微调器

<Spinner
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        style="@style/MyDropDownWithoutDivider" />

但它根本不起作用......

【问题讨论】:

    标签: android styles spinner


    【解决方案1】:

    使用此链接选择微调器样式...!

    http://android-holo-colors.com/

    在您的项目中保存所有可绘制文件、图像、样式和主题..

    然后像这样在你的 sipnner 编码中使用它...

    <Spinner 
         android:id="@+id/spinner"
         android:layout_width="match_parent"
         android:layout_height="45dp"
         android:background="@drawable/spinner_background_holo_light"
         />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-18
      相关资源
      最近更新 更多