2014-10-23 3 views

답변

5

Android Lollipop에서 ActionBar 기본 색상을 변경하려면이 태그를 추가해야한다는 것을 자세히 읽고 알아 보았습니다.

<!--textColorPrimary is used to change the text color of the default action bar--> 
    <item name="android:textColorPrimary">#FFFFFF</item> 
7

사용 @style/Theme.AppCompat.Light.DarkActionBar 텍스트와 어두운 색의 작업 표시 줄에 더 잘 맞는 다른 많은 속성의 착색을 교환합니다.

+1

에 그것을 테스트, 이후 예를 들어, 단지 하드를 만들고, 또한 드롭 다운 메뉴에서 텍스트를 변경합니다 흰색에 textColorPrimary 설정 독서. DarkActionBar를 사용하면 작업 표시 줄의 텍스트가 흰색이지만 메뉴의 텍스트는 검정색으로 유지됩니다. –

2

5.0 Lollipop4.4 KitKat이 더 나은 솔루션처럼 보인다

<style name="MyAppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 

    <!-- To change action bar text color --> 
    <item name="android:textColorPrimary">#123</item> 

    <!-- This has to be here to make it work; let me know if you know why --> 
    <item name="actionBarTheme">@style/ThemeOverlay.AppCompat.ActionBar</item>   

</style> 
관련 문제