Android Question Overriding themes in manifest file for spinner

Discussion in 'Android Questions' started by techgreyeye, Oct 4, 2018.

  1. techgreyeye

    techgreyeye Member Licensed User

    Hi All,

    I have just started trying to target my app builds to newer version of Android in order to put them on Google Play, previously they were targeted at sdk 4. This has caused my apps to change appearance, so I trying to get them looking how I want using themes and overriding where necessary.

    My manifest file is currently:

    <uses-sdk android:targetSdkVersion="26"/>
    <supports-screens android:largeScreens="true"
    SetApplicationAttribute(android:icon, "@drawable/icon")
    SetApplicationAttribute(android:label, "$LABEL$")
    SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
    SetActivityAttribute(ViewFile, android:windowSoftInputMode, adjustResize|stateHidden)
    SetActivityAttribute(Keyboard, android:windowSoftInputMode, adjustResize|stateHidden)
    SetApplicationAttribute(android:theme, "@style/DarkTheme")
    CreateResource(values-v20, theme.xml,
    name="DarkTheme" parent="@android:style/Theme.Material">
    <item name="android:textColor">#FFFF00</item>
    CreateResource(values-v14, theme.xml,
    name="DarkTheme" parent="@android:style/Theme.Holo">

    So that's great, I can set the default text color, but I can't work out how to set the background and text colors of a spinner, or any other individual item.

    Is there any information on this anyone can point me to? Or is my approach (editing the manifest) wrong and I should be doing something else?

    Thank you,

  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    Why aren't you using CreateResourceFromFile?

    Change the Spinner colors with Spinner.DropdownBackgroundColor and DropDownTextColor.
    Peter Simpson likes this.
  3. techgreyeye

    techgreyeye Member Licensed User

    Hi Erel,

    Thanks for the response.

    I'm not using CreateResourceFromFile because I didn't know about it. Everything I have done so far is from examples picked up on the forums here. I will look it up.

    I've worked out the following, which I assume is correct and seems to work.
    CreateResource(values-v20, theme.xml,
    "DarkTheme" parent="@android:style/Theme.Material">
        <item name=
        <item name=
    CreateResource(values-v20, styles.xml,
           <style name=
             <item name=

    I just need to use CreateResourceFromFile ...
    DonManfred likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice