2016-04-06 2 views
1

Ich habe ein Problem festgestellt, das mich dazu gebracht hat, mir ein paar Tage die Haare auszuziehen, und Googeln und Suchen hier hat niemanden aufgedeckt, der das selbe angetroffen zu haben scheint. Ich habe Java an der Universität gelernt, aber ich lerne gerade erst Android. Ich arbeite gerade an einer Schule und habe in meiner Freizeit eine grundlegende Lernquiz-App aufgebaut, um mit Kindern im Unterricht zu spielen, aber ich habe ein Layout-Verhalten kennengelernt, das ich einfach nicht verstehe.Anzeigen von Text im Android-Layout, das zuvor standardmäßig schwarz war, ist jetzt standardmäßig grau. Ich kann nicht herausfinden, was sich geändert hat.

Als ich diese App startete, war der Text immer schwarz oder zumindest so dunkelgrau, dass ich den Unterschied nicht wirklich erkennen konnte. Jede Aktivität, die ich auslegte, hatte einen schönen, dunklen Text. Ich habe eine davon modifiziert, um vor ein paar Tagen TextView-Beschriftungen über einigen Fortschrittsbalken hinzuzufügen, und bemerkte, dass der Text auf den Etiketten etwas blasser als gewöhnlich erschien, aber als AA ablehnte, da die Schrift so klein war und alle zuvor hinzugefügte Komponenten waren immer noch schön und dunkel. Als ich jedoch danach eine andere, neue Aktivität erstellte, war die Textfarbe jedes TextView, das ich hinzufügte, das gleiche mittlere Grau von den vorherigen Labels. Ich kann die Farbe dieser Etiketten individuell einstellen, was auch immer ich mag, und sie ändern sich, aber ich sehe nicht, warum ich dies für jede neue Ansicht in jeder neuen Aktivität tun sollte, während die bereits existierenden wie immer funktionieren. Ich verstehe nicht, warum sie sich anders verhalten.

Ich habe versucht, "@ Farbe/schwarz" im App-Thema "AppTheme", die ich zuvor nie berührt hatte, und während der Text wurde schwarz, brach es deaktivieren Tasten, in dem sie schwarz bleiben würde statt Farbe ändern, wenn deaktiviert, so sah immer noch aktiv aus. Außerdem würde ich lieber verstehen, was schiefgelaufen ist, als dass es klamm ist.

Kann mir also jemand sagen, warum der TextView-Text im ersten der folgenden Layouts standardmäßig eine Art von mittlerem Grau hat, während der Text im zweiten standardmäßig schwarz ist? Ich kann nicht sehen, was der Unterschied ist, und sie haben sogar die gleiche verschachtelte Layoutstruktur haben, aber sie machen in verschiedenen Farben ...

Neue Aktivitäten Layout macht weirdly grau:

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:paddingBottom="@dimen/activity_vertical_margin" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    tools:context=".QuestionResultsPageActivity"> 

    <ScrollView 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginBottom="@dimen/activity_horizontal_margin"> 

     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 

      <TextView 
       android:id="@+id/questionTitleTextView" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_marginTop="@dimen/questionTitleTextViewTopMargin" 
       android:text="@string/questionTitleTextViewText" 
       android:textSize="@dimen/questionTitleTextViewTextSize" 
       android:textStyle="bold" /> 

      <TextView 
       android:id="@+id/questionTextTextView" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/questionTitleTextView" 
       android:layout_marginLeft="@dimen/controls_horizontal_margin" 
       android:layout_marginRight="@dimen/controls_horizontal_margin" 
       android:text="@string/questionTextTextViewText" 
       android:textSize="@dimen/questionTextTextViewTextSize" /> 

      <TextView 
       android:id="@+id/answerTitleTextView" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/questionTextTextView" 
       android:layout_marginTop="@dimen/answerTitleTextViewTopMargin" 
       android:text="@string/answerTitleTextViewText" 
       android:textSize="@dimen/answerTitleTextViewTextSize" 
       android:textStyle="bold" /> 

      <TextView 
       android:id="@+id/answerLetterTextView" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/answerTitleTextView" 
       android:layout_marginLeft="@dimen/controls_horizontal_margin" 
       android:layout_marginRight="@dimen/answerLabelSpacing" 
       android:text="@string/answerLetterTextViewText" 
       android:textSize="@dimen/answerLabelTextViewTextSize" 
       android:textStyle="bold" /> 

      <TextView 
       android:id="@+id/answerTextTextView" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/answerTitleTextView" 
       android:layout_toRightOf="@id/answerLetterTextView" 
       android:text="@string/answerTextTextViewText" 
       android:textSize="@dimen/answerTextTextViewTextSize" /> 

      <TextView 
       android:id="@+id/resultsTitleTextView" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/answerTextTextView" 
       android:layout_marginTop="@dimen/resultsTitleTextViewTopMargin" 
       android:text="@string/resultsTitleTextViewText" 
       android:textSize="@dimen/resultsTitleTextViewTextSize" 
       android:textStyle="bold" /> 

      <LinearLayout 
       android:id="@+id/resultsBlockLinearLayout" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/resultsTitleTextView" 
       android:baselineAligned="false" 
       android:orientation="horizontal"> 

       <LinearLayout 
        android:id="@+id/questionResultTeamNamesLinearLayout" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_weight="1" 
        android:orientation="vertical"> 

        <TextView 
         android:id="@+id/questionResultTeamNameHeadingTextView" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team" 
         android:textSize="@dimen/teamResultsNameTextSize" 
         android:textStyle="bold" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_1" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 1" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_2" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 2" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_3" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 3" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_4" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 4" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_5" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 5" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_6" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 6" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_7" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 7" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_8" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 8" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_9" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Team 9" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

       </LinearLayout> 

       <LinearLayout 
        android:id="@+id/questionResultTeamAnswerLetterLinearLayout" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_weight="1" 
        android:orientation="vertical"> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_9" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="\?" 
         android:textSize="@dimen/teamResultsNameTextSize" 
         android:textStyle="bold" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_1" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_2" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_3" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_4" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_5" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_6" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_7" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_8" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamNameTextView_9" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="A" 
         android:textSize="@dimen/teamResultsNameTextSize" /> 

       </LinearLayout> 

       <LinearLayout 
        android:id="@+id/questionResultTeamTimesLinearLayout" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_weight="1" 
        android:orientation="vertical"> 

        <TextView 
         android:id="@+id/questionResultTeamTimeHeadingTextView" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Time" 
         android:textSize="@dimen/teamResultsTimeTextSize" 
         android:textStyle="bold" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_1" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_2" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_3" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_4" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_5" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_6" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_7" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_8" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamTimeTextView_9" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="123 + 27 = 150" 
         android:textSize="@dimen/teamResultsTimeTextSize" /> 

       </LinearLayout> 

       <LinearLayout 
        android:id="@+id/questionResultTeamScoresLinearLayout" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_weight="1" 
        android:orientation="vertical"> 

        <TextView 
         android:id="@+id/questionResultTeamScoreHeadingTextView" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="Score" 
         android:textSize="@dimen/teamResultsScoreTextSize" 
         android:textStyle="bold" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_1" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_2" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_3" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_4" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_5" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_6" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_7" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_8" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

        <TextView 
         android:id="@+id/questionResultTeamScoreTextView_9" 
         android:layout_width="wrap_content" 
         android:layout_height="wrap_content" 
         android:text="10 + 1 = 11" 
         android:textSize="@dimen/teamResultsScoreTextSize" /> 

       </LinearLayout> 

      </LinearLayout> 

     </RelativeLayout> 

    </ScrollView> 

    <Button 
     android:id="@+id/questionResultOKButton" 
     android:layout_width="@dimen/okButtonWidth" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_centerHorizontal="true" 
     android:layout_marginBottom="@dimen/activity_horizontal_margin" 
     android:onClick="askNextQuestion" 
     android:text="@string/okButtonLabelText" 
     android:textSize="@dimen/okButtonLabelTextSize" /> 

</RelativeLayout> 

Kurioserweise ist der Text auf der Schaltfläche unten in diesem Layout immer noch dunkel/schwarz. Alle TextViews sind zwar in der Mitte grau (obwohl die in älteren Aktivitäten nicht sind).

Whoops, kein Platz in der Post für das nächste Layout wegen 30K Zeichen Grenze. Wird separat als neue Antwort hinzugefügt. Vielleicht kann jemand sehen, was anders ist.


Oh, und nur für den Fall, AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="//REDACTED"> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".StartPageActivity" 
      android:screenOrientation="portrait"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".AskQuestionActivity" 
      android:screenOrientation="portrait"> 
     </activity> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".TeamEntryActivity" 
      android:screenOrientation="portrait"> 

     </activity> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".AnswerEntryActivity" 
      android:screenOrientation="portrait"> 

     </activity> 

     //SOME GREY IN RECENT EDITS (in the ProgressBar label TextViews) 
     <activity android:name=".GameResultsPageActivity"> 
      android:screenOrientation="portrait"> 
     </activity> 

     //ALL GREY, WTF?! 
     <activity android:name=".QuestionResultsPageActivity"> 
      android:screenOrientation="portrait"> 
     </activity> 
    </application> 

</manifest> 

und styles.xml:

<resources> 

    <!-- Base application theme. --> 
    <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/colorAccent</item> 

    </style> 

</resources> 

ich dies erst nach dem nicht berührt hatte, Problem trat auf, als ich versuchte, Dinge zu reparieren. Ist das übergeordnete Thema "Theme.AppCompat.Light.DarkActionBar" das übliche Standardparent? Ich weiß nicht, wie ich es hätte ändern können, aber könnte es die Quelle der blassen Standardtextfarbe sein?

Wie kann ich die Standardeinstellungen der Standardthemen finden? (Wie "PrimaryTextColor" von "Theme.AppCompat.Light.DarkActionBar"?)

Ich würde gerne verstehen, was hier passiert ist, wenn möglich, damit ich es in Zukunft vermeiden kann.

Antwort

0

Und ältere Aktivität Layout, macht mit Ausnahme der Textviews über Progress schön dunkel: (nicht in ursprüngliche Frage passte ...)

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:paddingBottom="@dimen/activity_vertical_margin" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    tools:context=".GameResultsPageActivity"> 

    <ScrollView 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     android:layout_marginBottom="@dimen/activity_horizontal_margin"> 

     <RelativeLayout 
      android:id="@+id/resultsPageLayout" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" > 

      <TextView 
       android:id="@+id/gameOverLabel" 
       android:text="@string/gameOverLabelText" 
       android:textSize="@dimen/gameOverLabelTextSize" 
       android:textAppearance="?android:attr/textAppearanceLarge" 
       android:textStyle="bold" 
       android:layout_marginTop="@dimen/activity_vertical_margin" 
       android:layout_centerHorizontal="true" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_alignParentTop="true"/> 

      <TextView 
       android:id="@+id/questionsAnsweredLabel" 
       android:text="@string/questionsAnsweredLabelText" 
       android:textSize="@dimen/questionAnsweredLabelTextSize" 
       android:textAppearance="?android:attr/textAppearanceLarge" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/gameOverLabel" 
       android:layout_alignParentLeft="true" 
       android:layout_marginLeft="@dimen/controls_horizontal_margin"/> 

      <TextView 
       android:id="@+id/questionsAnsweredTextView" 
       android:text="\?" 
       android:textSize="@dimen/questionAnsweredLabelTextSize" 
       android:textAppearance="?android:attr/textAppearanceLarge" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/gameOverLabel" 
       android:layout_alignParentRight="true" 
       android:layout_marginRight="@dimen/controls_horizontal_margin"/> 

      <TextView 
       android:id="@+id/finalScoresLabel" 
       android:text="@string/finalScoresLabelText" 
       android:textSize="@dimen/finalScoresLabelTextSize" 
       android:textStyle="bold" 
       android:textAppearance="?android:attr/textAppearanceLarge" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/questionsAnsweredLabel" 
       android:layout_marginLeft="@dimen/controls_horizontal_margin" 
       android:layout_marginTop="@dimen/question_answer_vertical_spacing"/> 

      <RelativeLayout 
       android:id="@+id/team1ScoreLayout" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_below="@id/finalScoresLabel"> 

       <TextView 
        android:id="@+id/teamNameLabel_1" 
        android:text="Large Text" 
        android:textSize="@dimen/finalScoresListTextSize" 
        android:textAppearance="?android:attr/textAppearanceLarge" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_alignParentLeft="true" 
        android:layout_marginLeft="@dimen/controls_horizontal_margin"/> 

       <TextView 
        android:id="@+id/teamScoreLabel_1" 
        android:text="X" 
        android:textStyle="bold" 
        android:textSize="@dimen/finalScoresListTextSize" 
        android:textAppearance="?android:attr/textAppearanceLarge" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_alignParentRight="true" 
        android:layout_marginRight="@dimen/controls_horizontal_margin"/> 

       <ProgressBar 
        android:id="@+id/team1ScoreProgressBar" 
        style="@android:style/Widget.ProgressBar.Horizontal" 
        android:progressDrawable="@drawable/gold_progress" 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:layout_toRightOf="@id/teamNameLabel_1" 
        android:layout_toLeftOf="@id/teamScoreLabel_1" 
        android:layout_marginLeft="@dimen/resultsPageProgressLRMargins" 
        android:layout_marginRight="@dimen/resultsPageProgressLRMargins" 
        android:max="100" 
        android:progress="90" /> 

       <TextView 
        android:id="@+id/team1ScorePercentagetextView" 
        android:text="100%" 
        android:textStyle="bold" 
        android:textSize="@dimen/scorePercentageTextSize" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_alignTop="@id/team1ScoreProgressBar" 
        android:layout_alignBottom="@id/team1ScoreProgressBar" 
        android:layout_alignLeft="@id/team1ScoreProgressBar" 
        android:layout_alignRight="@id/team1ScoreProgressBar" 
        android:gravity="center"/> 

       <ProgressBar 
        android:id="@+id/team1TimeProgressBar" 
        style="?android:attr/progressBarStyleHorizontal" 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:layout_toRightOf="@id/teamNameLabel_1" 
        android:layout_toLeftOf="@id/teamScoreLabel_1" 
        android:layout_marginLeft="@dimen/resultsPageProgressLRMargins" 
        android:layout_marginRight="@dimen/resultsPageProgressLRMargins" 
        android:layout_below="@id/team1ScoreProgressBar" 
        android:max="100" 
        android:progress="80" /> 

       <TextView 
        android:id="@+id/team1TimetextView" 
        android:text="123s" 
        android:textStyle="bold" 
        android:textSize="@dimen/timeLabelTextSize" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_alignTop="@id/team1TimeProgressBar" 
        android:layout_alignBottom="@id/team1TimeProgressBar" 
        android:layout_alignLeft="@id/team1TimeProgressBar" 
        android:layout_alignRight="@id/team1TimeProgressBar" 
        android:gravity="center"/> 

      </RelativeLayout> 

      //REPEAT NESTED LAYOUTS ABOVE EIGHT MORE TIMES FOR TEAMS 2-9 
      //EDITED OUT TO FIT IN ANSWER CHARACTER LIMIT 

      <Button 
       android:id="@+id/closeResultsButton" 
       android:onClick="returnToStartGameActivity" 
       android:text="@string/okButtonLabelText" 
       android:textSize="@dimen/okButtonLabelTextSize" 
       android:textAllCaps="false" 
       android:layout_marginBottom="@dimen/controls_vertical_spacing" 
       android:layout_width="@dimen/okButtonWidth" 
       android:layout_height="wrap_content" 
       android:layout_alignParentBottom="true" 
       android:layout_centerHorizontal="true" 
       android:layout_below="@id/team9ScoreLayout"/> 

     </RelativeLayout> 

    </ScrollView> 

</RelativeLayout> 

Alle anderen alten Aktivitäten machen dunkel, so dass ich keine Ahnung, was hier vor sich geht. Bitte helfen Sie?

Oh, und nur für den Fall, AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="//REDACTED"> 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".StartPageActivity" 
      android:screenOrientation="portrait"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".AskQuestionActivity" 
      android:screenOrientation="portrait"> 
     </activity> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".TeamEntryActivity" 
      android:screenOrientation="portrait"> 

     </activity> 

     //ALL DARK, NO PROBS 
     <activity 
      android:name=".AnswerEntryActivity" 
      android:screenOrientation="portrait"> 

     </activity> 

     //SOME GREY IN RECENT EDITS (in the ProgressBar label TextViews) 
     <activity android:name=".GameResultsPageActivity"> 
      android:screenOrientation="portrait"> 
     </activity> 

     //ALL GREY, WTF?! 
     <activity android:name=".QuestionResultsPageActivity"> 
      android:screenOrientation="portrait"> 
     </activity> 
    </application> 

</manifest> 

und styles.xml:

<!-- Base application theme. --> 
    <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/colorAccent</item> 

    </style> 

</resources> 

ich dies, bis nicht berührt hatte, nachdem das Problem aufgetreten als ich versuchte Dinge zu reparieren. Ist das übergeordnete Thema "Theme.AppCompat.Light.DarkActionBar" das übliche Standardparent? Ich weiß nicht, wie ich es hätte ändern können, aber könnte es die Quelle der blassen Standardtextfarbe sein?

Wie kann ich die Standardeinstellungen der Standardthemen finden? (Wie "Theme.AppCompat.Light.DarkActionBar" 's primaryTextColor?)

Ich würde gerne verstehen, was hier passiert ist, wenn möglich, so dass ich es in Zukunft vermeiden kann.

Edit: Gelöst

schließlich alle dunklen Ansichten android:textAppearance="?android:attr/textAppearanceLarge" Satz hatte bemerkt. Was offensichtlich auch die Textfarbe verdunkelt, obwohl attr/textAppearanceMedium und attr/textAppearanceSmall nicht. Verwenden Sie hauptsächlich die Einfüge-Schaltfläche "Large Text" oder kopieren und fügen Sie diese vorhandenen Blöcke ausreichend ein und es sieht so aus, als ob der gesamte Text standardmäßig dunkel ist. Starten Sie eine neue Aktivität mit der "Plain TextView" anstelle von "Large Text", um Ansichten in die Baumstruktur einzufügen und plötzlich scheint es, als hätte sich die Standardfarbe geändert. :/

+0

Hat meine Antwort Ihnen geholfen? –

0

überprüfen Sie AndroidMaifest.xml Datei und suchen Sie nach dem android:theme= Zeilencode. Mine sieht wie folgt aus:

<application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/Theme.AppCompat.Light.NoActionBar"> 
     <activity android:name=".SplashScreen"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity>........... 
+0

<- Haben nie

0

Sie diese, indem Sie auf Ihre style.xml Datei ändern können und das Hinzufügen von addding android: textColorPrimary andr android: textColorSecondary zu Ihrem gewünschten Farben innerhalb Ihres Themas. Dies wird automatisch auf Ihre gesamte Anwendung angewendet. Hoffe das hilft.

+0

Danke, werde ich versuchen. Was ist die "textColorSecondary" Farbe, wenn? Die deaktiviert Farbe? Der Schatten oder Highlight-Farbe? Etwas Sonst auch, was hier geändert wurde, dass ich diese Werte jetzt manuell überschreiben muss Der Standard "AppTheme", der in styles.xml definiert wurde, war nie verändert worden, bis ich damit angefangen habe, danach zu spielen. –

+0

Du solltest diese Eigenschaften hinzufügen Ihr Thema: Um ehrlich zu sein weiß ich nicht genau, was passiert ist, aber ich hatte ein ähnliches Problem bei meinem letzten Projekt und das ist, wie ich es gelöst habe. Soweit ich weiß, wird TextColorSecondary Dinge wie das Home als Up Button und Das Symbol für das Overlay-Optionen-Menü –

Verwandte Themen