Bladeren bron

Fixed background and text color for dark theme

Vadik Sirekanyan 7 jaren geleden
bovenliggende
commit
5eec0f37aa

+ 0 - 1
app/src/main/res/layout/activity_main.xml

@@ -5,7 +5,6 @@
     android:id="@+id/container"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/white"
     android:orientation="vertical"
     tools:context="me.vadik.knigopis.MainActivity">
 

+ 2 - 2
app/src/main/res/layout/book.xml

@@ -43,7 +43,7 @@
             android:layout_height="wrap_content"
             android:ellipsize="end"
             android:maxLines="1"
-            android:textColor="@android:color/primary_text_light"
+            android:textColor="?android:attr/textColorPrimary"
             android:textSize="16sp"
             tools:text="Мастер и Маргарита" />
 
@@ -53,7 +53,7 @@
             android:layout_height="wrap_content"
             android:ellipsize="end"
             android:maxLines="1"
-            android:textColor="@android:color/tertiary_text_light"
+            android:textColor="?android:attr/textColorTertiary"
             android:textSize="14sp"
             tools:text="Михаил Булгаков" />
 

+ 6 - 6
app/src/main/res/layout/note.xml

@@ -28,7 +28,7 @@
             android:id="@+id/bookTitle"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textColor="@android:color/primary_text_light"
+            android:textColor="?android:attr/textColorPrimary"
             android:textSize="16sp"
             tools:text="Мастер и Маргарита Мастер и Маргарита Мастер и Маргарита Мастер и Маргарита" />
 
@@ -36,7 +36,7 @@
             android:id="@+id/bookAuthor"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textColor="@android:color/secondary_text_light"
+            android:textColor="?android:attr/textColorSecondary"
             android:textSize="14sp"
             tools:text="Михаил Булгаков Михаил Булгаков Михаил Булгаков Михаил Булгаков" />
 
@@ -45,7 +45,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="4dp"
-            android:textColor="@android:color/tertiary_text_light"
+            android:textColor="?android:attr/textColorTertiary"
             tools:text="Заявленный жанр - ужасы. Отзыв на книге самого Стивена Кинга(а я фанатею от Кинга) обещает нам трястись от страха. Реальность: довольно тошнотворная история о геноциде и рассизме. Было интересно читать о жизни различных национальных меньшинств в Америке. О том, как сложно жилось (и, возможно, живется) коренным жителям континента. Это действительно то, от чего Америке никогда не отмыться. Сюжетная линия завязана на 4х основных и множества второстепенных героев. ... Но как книга, увы, художественной ценности произведение не несет. И тем более ни чем не пугает. Для разнообразия почитать можно. Оценка: 4 из 10" />
 
         <LinearLayout
@@ -58,7 +58,7 @@
                 android:id="@+id/userDate"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:textColor="@android:color/tertiary_text_light"
+                android:textColor="?android:attr/textColorTertiary"
                 android:textSize="14sp"
                 tools:text="5 минут назад" />
 
@@ -68,14 +68,14 @@
                 android:layout_marginEnd="8dp"
                 android:layout_marginStart="8dp"
                 android:text="@string/note_date_delimiter"
-                android:textColor="@android:color/tertiary_text_light"
+                android:textColor="?android:attr/textColorTertiary"
                 android:textSize="14sp" />
 
             <TextView
                 android:id="@+id/userNickname"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:textColor="@android:color/tertiary_text_light"
+                android:textColor="?android:attr/textColorTertiary"
                 android:textSize="14sp"
                 tools:text="Павел Дуров" />
 

+ 2 - 2
app/src/main/res/layout/user.xml

@@ -25,7 +25,7 @@
         android:ellipsize="end"
         android:gravity="center_vertical"
         android:maxLines="1"
-        android:textColor="@android:color/primary_text_light"
+        android:textColor="?android:attr/textColorPrimary"
         android:textSize="16sp"
         tools:text="Павел Дуров Павел Дуров Павел Дуров Павел Дуров" />
 
@@ -36,7 +36,7 @@
         android:layout_marginLeft="16dp"
         android:layout_marginStart="16dp"
         android:gravity="center_vertical"
-        android:textColor="@android:color/tertiary_text_light"
+        android:textColor="?android:attr/textColorTertiary"
         android:textSize="16sp"
         tools:text="40" />
 

File diff suppressed because it is too large
+ 3 - 3
app/src/main/res/layout/user_book.xml


+ 1 - 0
app/src/main/res/values/colors.xml

@@ -2,6 +2,7 @@
 <resources>
     <color name="common_deep_purple_700">#512DA8</color>
     <color name="common_deep_purple_500">#673AB7</color>
+    <color name="common_deep_orange_accent_400">#FF3D00</color>
     <color name="common_black">#000000</color>
     <color name="common_grey_900">#212121</color>
     <color name="common_grey_850">#303030</color>

+ 2 - 2
app/src/main/res/values/styles.xml

@@ -4,7 +4,7 @@
         <item name="colorPrimary">@color/light.color_primary</item>
         <item name="colorPrimaryDark">@color/light.color_primary_dark</item>
         <item name="colorAccent">@color/colorAccent</item>
-        <item name="android:windowBackground">@color/knigopis_splash_background</item>
+        <item name="android:windowBackground">@color/light.background_color</item>
         <item name="android:listDivider">@drawable/recycler_view_divider</item>
         <item name="image_placeholder_color">@color/image_placeholder_color_light</item>
         <item name="android:textColorPrimary">@color/light.text_color_primary</item>
@@ -16,7 +16,7 @@
         <item name="colorPrimary">@color/dark.color_primary</item>
         <item name="colorPrimaryDark">@color/dark.color_primary_dark</item>
         <item name="colorAccent">@color/colorAccent</item>
-        <item name="android:windowBackground">@color/knigopis_splash_background</item>
+        <item name="android:windowBackground">@color/dark.background_color</item>
         <item name="android:listDivider">@drawable/recycler_view_divider</item>
         <item name="image_placeholder_color">@color/image_placeholder_color_dark</item>
         <item name="android:textColorPrimary">@color/dark.text_color_primary</item>

Some files were not shown because too many files changed in this diff