Change the color of spinner, Autocompletetextview split lines in Android

Source: Internet
Author: User

The method of removing the dividing line has been found for a long time, and finally found a way to change the split line


The spinner and Autocompletetextview hint list has a black dividing line in the middle, and if you want to change its color value, rewrite the style.

1. Write a style in themes


<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. The style is called in the manifest of the activity where the control resides


        <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>


The list is the style without the split line.



Change the color of spinner, Autocompletetextview split lines in Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.