Android-spinner Style Implementation

Source: Internet
Author: User

Here is the main implementation of the spinner style in theme, as follows

<style name= "Theme.funui" parent= "Theme.Holo.Light" >
<item name= "Spinnerstyle" >?android:attr/dropDownSpinnerStyle</item> <item name= " Dropdownspinnerstyle "> @android:style/widget.funui.spinner.dropdown</item>
<item name= "Dropdownitemstyle" > @android:style/widget.funui.dropdownitem</item> <item name= " Spinnerdropdownitemstyle "> @android:style/widget.funui.dropdownitem.spinner</item> <item name=" Spinneritemstyle "> @android:style/widget.funui.textview.spinneritem</item></style><!-- Change the size and color of the item font--
<style name= "Widget.Funui.DropDownItem.Spinner" > <item name= "Android:textcolor" > #323232 </item> & Lt;item name= "Android:textsize" >15sp</item>
</style><!--Change the size and color of hint fonts and margins, and so on
<style name= "Widget.Funui.TextView.SpinnerItem" parent= "Widget.Holo.TextView.SpinnerItem" > <item name= "an Droid:textcolor "> #323232 </item> <item name=" android:textsize ">15sp</item> <item name = "Android:paddingstart" >3dp</item> <item name= "Android:paddingend" >3dp</item> </style&gt ; <style name= "Widget.Funui.Spinner" parent= "Widget.Holo.Spinner" > <item name= "Android:background" > @andr oid:drawable/spinner_background_funui</item> <item name= "Android:dropdownselector" > @android:d rawable /list_selector_funui</item>
<!--determine spinner pop-up mode, drop-down and dialog two--
<item name= "Android:spinnermode" >dialog</item><!--Modify the background border style of the spinner-
<item name= "Android:popupbackground" > @android:d rawable/menu_dropdown_panel_funui</item> <item Name = "Android:dropdownverticaloffset" >0dip</item> <item name= "Android:dropdownhorizontaloffset" >0dip& lt;/item> <item name= "android:dropdownwidth" >wrap_content</item> <item name= "Android:popup Promptview "> @android:layout/simple_dropdown_hint</item> </style>

As for how layout layouts, there is no way to find it. By looking at the code you know, if you are using the dialog form, then this layout is actually implemented in dialog, because it is called dialog

Android-spinner Style Implementation

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.