내 appTheme에서 내 textview textColor를 흰색으로 만들려고하지만 내 조각에 검은 색으로 나타납니다.내 안드로이드 테마에서 흰색으로 설정하면 모든 텍스트가 검은 색으로 변하는 이유는 무엇입니까?
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:fillViewport="true"
android:layout_height="wrap_content"
android:id="@+id/fragment_settings"
android:background="?android:attr/windowBackground"
주제는 다음과 같습니다
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<!-- <item name="android:statusBarColor">@android:color/transparent</item> -->
</style>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/whiteText</item>
<item name="android:buttonStyle">@style/MyButton</item>
<item name="android:statusBarColor">@android:color/black</item>
<item name="android:colorBackground">#2d314d</item>
<item name="android:textColorPrimary">@color/whiteText</item>
<item name="android:textColorPrimaryInverse">@android:color/holo_red_dark</item>
<item name="android:textColorSecondary">@android:color/holo_blue_bright</item>
<item name="android:textColorSecondaryInverse">@android:color/holo_red_dark</item>
<item name="android:colorForeground">@android:color/holo_blue_bright</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
</style>
<style name="MyButton" parent="android:Widget.Button">
<item name="android:background">#FF5A79</item>
<item name="android:textColor">@color/whiteText</item>
</style>
</resources>
또한,이 확실하지 조각은 그래서 같은 배경이 설정되었습니다 다만 관련하여 테마 편집기를 사용하고 있으며 android : textcolorPrimary에 의해 colorButtonNormal과의 대비가 충분하지 않음을 경고합니다. 나는 colorButtonNormal이 무엇인지에 대해 잘 알지 못하며 그것에 대한 정보를 찾을 수 없다.
내가에있어하지만 또 다른 문제는 텍스트 색상 내가 그것을 바꿀 필요가있는 EDITTEXT 필드 (중량 및 AGE) 내부에 흰색입니다 : 이것은 내 테마 편집기 내 현재 설정 모습입니다 흑인 이군.
어떤 도움을 주셔서 감사합니다.이 안드로이드 스타일의 물건으로 인해 나는 너트를 몰고 가고 있습니다. 이
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:fillViewport="true"
android:layout_height="wrap_content"
android:id="@+id/fragment_settings"
android:background="@android:color/white"/>
이에 대한
매니페스트에서 특정 활동에 대해 원하는 테마를 설정 했습니까? –
매니페스트에서 액티비티 테마는 android : theme = "@ style/AppTheme.NoActionBar"로 설정되어 있습니다. 액티비티가 생성되면 안드로이드 스튜디오가 설정됩니다. 내가 그것을 제거하거나 NoActionBar 부분을 제거하면 에뮬레이터에 설치할 때 응용 프로그램이 충돌합니다. –
android : theme = "@ style/AppTheme"을 사용하여 작동하는지보십시오. –