Changing spinner arrow, Appcompat v21

前端 未结 5 2078
情深已故
情深已故 2021-02-04 17:56

i have activities which i themed with my custom theme, but for spinner i choosed to style it with Appcompat v21 but i got this :

5条回答
  •  孤独总比滥情好
    2021-02-04 18:55

    Since you are using AppCompat-v21, you can take advantage of the new material design styles attributes:

    colorPrimary: your app branding color for the app bar, applies to action bar

    colorPrimaryDark: darker variant for the status bar and contextual app bars

    colorAccent: lets you define bright complement to the primary branding color. By default, this is the color applied to framework controls (via colorControlActivated)

    colorControlNormal: color applied to framework controls in their normal state

    colorControlActivated: applied to framework controls in their activated

    Here is an example for you

    styles.xml

    
    
    

    colors.xml

    
        #ff0000ff
        #ff0000af
        #870000ff
        #ffffffff
    
    

    Here is how it looks

    enter image description here

    Hope this helps.

提交回复
热议问题