5
를 지정 나는안드로이드 스타일의 버튼 색상
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppTheme">
<item name="android:windowFullscreen">true</item>
<item name="android:windowBackground">@color/black</item>
<item name="android:textColor">@color/green</item>
</style>
가 어떻게 스타일 변경 버튼 색상을 확인하고 전체 응용 프로그램 전체에 적용 할 styles.xml에 기본적으로 버튼 텍스트 색상을 적용하려고? 내 메인 페스트에는 다음이 포함됩니다 :
<application
android:icon="@drawable/ic_launcher"
android:label="Hack the World"
android:theme="@style/AppTheme">
이 모든 텍스트 (예 : TextView)가 변경되지만 버튼의 텍스트는 변경되지 않습니다. 내가 위에서 ColorThemes 스타일을 사용하고이 같은 버튼의 XML에 배치 할 경우
<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:onClick="loadSavedgame"
android:text="Load Saved Game"
android:textColor="@color/green" />"
를 다음 그것은 완벽하게 작동합니다. 왜 스타일 때문에 보편적으로 적용되지 않습니까? styles.xml의 모든 다른 버전에는 동일한 코드가 있습니다.