zoukankan      html  css  js  c++  java
  • android中更改spinner、AutoCompleteTextView切割线的颜色

    话说去除切割线的方法找了非常久也没找到,最终发现了更改切割线的方法


     spinner和AutoCompleteTextView提示列表中间有一条黑色的切割线。想要改变它的颜色值,就要重写style。


    1.在themes里写个style


    	<style name="applicationTheme" parent="@android:style/Theme.Light">
             <item name="android:dropDownListViewStyle">@style/mySpinnerStyle</item>
        </style>
    
        <style name="mySpinnerStyle" parent="android:style/Widget.ListView.DropDown">
            <item name="android:divider">#00000000</item>
            <item name="android:dividerHeight">1dp</item>
        </style>

    2.控件所在的activity的manifest里调用style


            <activity
                android:name=".MainA"
                android:configChanges="orientation|keyboardHidden|screenSize"
                android:screenOrientation="portrait"
                android:windowSoftInputMode="adjustPan"
                <span style="background-color: rgb(255, 0, 0);">android:theme="@style/applicationTheme"</span>  >
                 <intent-filter> 
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>


    列表就是没有切割线的样式了



  • 相关阅读:
    PHP快速入门
    redis命令_ZREVRANGEBYSCORE
    redis命令_ZRANGE
    redis命令_ZREM
    redis命令_ZINCRBY
    redis命令_ZADD
    redis命令_SETEX
    编译过程的一点心得
    关于c语言中的program_invocation_short_name
    关于toolchain(工具链)的一点知识
  • 原文地址:https://www.cnblogs.com/bhlsheji/p/5138773.html
Copyright © 2011-2022 走看看