In android, you can change the color of the spinner and AutoCompleteTextView splitters. In android, The splitters

Source: Internet
Author: User

In android, you can change the color of the spinner and AutoCompleteTextView splitters. In android, The splitters

The method for removing the split line was not found for a long time. Finally, the method for changing the split line was found.


The spinner and AutoCompleteTextView prompts that there is a black split line in the list. 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. Call style in manifest of the activity where the control is located


        <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 with no split lines.



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.