Преглед на файлове

various style changes: toolbar item are now white + removed rounded corners from EditorFragment toolbar + smaller text in alpha software warning + smaller face icon in newEmailPopup + rename 'Information' -> 'About' in the master dot menu

Noah Vogt преди 3 години
родител
ревизия
9ef352b3f4

+ 2 - 3
app/src/main/java/com/noahvogt/snailmail/ui/drawer/DrawerFunctions.java

@@ -416,11 +416,10 @@ public class DrawerFunctions {
                         break;
                     }
                 }
-            } catch (NullPointerException ignored) {
-            }
+            } catch (NullPointerException ignored) {}
         });
 
-                exit.setOnClickListener(v ->rootAccountManagerDialog.dismiss());
+        exit.setOnClickListener(v ->rootAccountManagerDialog.dismiss());
     }
 
     public void newUserAlphaSoftwareWarningBeforeAddingEmail(boolean button, View view, Context context, LayoutInflater layoutInflater) {

+ 2 - 2
app/src/main/res/drawable/ic_baseline_face_24.xml

@@ -3,8 +3,8 @@
     android:height="24dp"
     android:viewportWidth="24"
     android:viewportHeight="24"
-    android:tint="?attr/colorControlNormal">
+    android:tint="#666666">
   <path
-      android:fillColor="@android:color/white"
+      android:fillColor="#666666"
       android:pathData="M9,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM15,11.75c-0.69,0 -1.25,0.56 -1.25,1.25s0.56,1.25 1.25,1.25 1.25,-0.56 1.25,-1.25 -0.56,-1.25 -1.25,-1.25zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8 0,-0.29 0.02,-0.58 0.05,-0.86 2.36,-1.05 4.23,-2.98 5.21,-5.37C11.07,8.33 14.05,10 17.42,10c0.78,0 1.53,-0.09 2.25,-0.26 0.21,0.71 0.33,1.47 0.33,2.26 0,4.41 -3.59,8 -8,8z"/>
 </vector>

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

@@ -8,8 +8,8 @@
 
     <ImageView
         android:id="@+id/newlisticon"
-        android:layout_width="150dp"
-        android:layout_height="150dp"
+        android:layout_width="70dp"
+        android:layout_height="70dp"
         android:background="@drawable/ic_baseline_face_24"
 
         android:contentDescription="@string/face_icon"

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

@@ -29,6 +29,7 @@
         android:layout_height="?attr/actionBarSize"
         android:layout_gravity="top"
         android:background="?attr/colorPrimary"
+        app:titleTextColor="@android:color/white"
         app:popupTheme="@style/Theme.MiniProjekt.PopupOverlay" />
 
 </androidx.coordinatorlayout.widget.CoordinatorLayout>

+ 83 - 77
app/src/main/res/layout/editor_fragment.xml

@@ -11,86 +11,92 @@
         android:id="@+id/cardView"
         android:layout_width="match_parent"
         android:layout_height="?attr/actionBarSize"
+        app:cardPreventCornerOverlap="false"
+        app:cardCornerRadius="0dp"
         app:cardBackgroundColor="#5e35b1">
 
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
 
-        <ImageButton
-            android:id="@+id/create_message_close_button"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_marginLeft="8dp"
-            android:layout_marginStart="8dp"
-            android:background="?attr/selectableItemBackgroundBorderless"
-            android:padding="8dp"
-            android:src="@drawable/ic_baseline_close_24" />
-
-        <TextView
-            android:id="@+id/create_message_text_text"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_marginStart="8dp"
-            android:layout_marginLeft="8dp"
-            android:layout_toEndOf="@+id/create_message_close_button"
-            android:layout_toRightOf="@+id/create_message_close_button"
-            android:text="@string/text_create_message"
-            android:textColor="@android:color/white"
-            android:textSize="20sp" />
-
-
-        <ImageButton
-            android:id="@+id/create_message_attach_button"
-            android:layout_width="56dp"
-            android:layout_height="match_parent"
-
-            android:layout_marginStart="0dp"
-            android:layout_marginLeft="0dp"
-            android:layout_marginEnd="40dp"
-            android:layout_marginRight="40dp"
-            android:layout_toStartOf="@+id/create_message_send_button"
-            android:layout_toLeftOf="@+id/create_message_send_button"
-            android:layout_toEndOf="@+id/create_message_text_text"
-            android:layout_toRightOf="@+id/create_message_text_text"
-            android:background="?attr/selectableItemBackgroundBorderless"
-            android:padding="8dp"
-            android:src="@drawable/ic_baseline_attachment_24" />
-
-        <ImageButton
-        android:id="@+id/create_message_dots_button"
-        android:layout_width="56dp"
-        android:layout_height="match_parent"
-
-        android:layout_marginStart="50dp"
-        android:layout_marginLeft="50dp"
-        android:layout_marginEnd="-10dp"
-        android:layout_marginRight="-10dp"
-        android:layout_toStartOf="@+id/create_message_send_button"
-        android:layout_toLeftOf="@+id/create_message_send_button"
-        android:layout_toEndOf="@+id/create_message_text_text"
-        android:layout_toRightOf="@+id/create_message_text_text"
-        android:background="?attr/selectableItemBackgroundBorderless"
-        android:padding="8dp"
-        android:src="@drawable/ic_round_pending_24" />
-
-        <ImageButton
-            android:id="@+id/create_message_send_button"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentRight="true"
-            android:layout_alignParentEnd="true"
-            android:layout_centerVertical="true"
-            android:layout_marginRight="8dp"
-            android:layout_marginEnd="8dp"
-            android:background="?attr/selectableItemBackground"
-            android:padding="8dp"
-            android:src="@drawable/ic_baseline_arrow_forward_ios_24"
-            android:textColor="@android:color/white" />
-
-    </RelativeLayout>
+            <ImageButton
+                android:id="@+id/create_message_close_button"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:padding="8dp"
+                android:src="@drawable/ic_baseline_close_24"
+                app:tint="@android:color/white" />
+
+            <TextView
+                android:id="@+id/create_message_text_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_marginStart="8dp"
+                android:layout_marginLeft="8dp"
+                android:layout_toEndOf="@+id/create_message_close_button"
+                android:layout_toRightOf="@+id/create_message_close_button"
+                android:text="@string/text_create_message"
+                android:textColor="@android:color/white"
+                android:textSize="20sp" />
+
+
+            <ImageButton
+                android:id="@+id/create_message_attach_button"
+                android:layout_width="56dp"
+                android:layout_height="match_parent"
+
+                android:layout_marginStart="0dp"
+                android:layout_marginLeft="0dp"
+                android:layout_marginEnd="40dp"
+                android:layout_marginRight="40dp"
+                android:layout_toStartOf="@+id/create_message_send_button"
+                android:layout_toLeftOf="@+id/create_message_send_button"
+                android:layout_toEndOf="@+id/create_message_text_text"
+                android:layout_toRightOf="@+id/create_message_text_text"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:padding="8dp"
+                android:src="@drawable/ic_baseline_attachment_24"
+                android:tint="@android:color/white" />
+
+            <ImageButton
+                android:id="@+id/create_message_dots_button"
+                android:layout_width="56dp"
+                android:layout_height="match_parent"
+
+                android:layout_marginStart="50dp"
+                android:layout_marginLeft="50dp"
+                android:layout_marginEnd="-10dp"
+                android:layout_marginRight="-10dp"
+                android:layout_toStartOf="@+id/create_message_send_button"
+                android:layout_toLeftOf="@+id/create_message_send_button"
+                android:layout_toEndOf="@+id/create_message_text_text"
+                android:layout_toRightOf="@+id/create_message_text_text"
+                android:background="?attr/selectableItemBackgroundBorderless"
+                android:padding="8dp"
+                android:src="@drawable/ic_round_pending_24"
+                android:tint="@android:color/white" />
+
+            <ImageButton
+                android:id="@+id/create_message_send_button"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentEnd="true"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:layout_marginEnd="8dp"
+                android:layout_marginRight="8dp"
+                android:background="?attr/selectableItemBackground"
+                android:padding="8dp"
+                android:src="@drawable/ic_baseline_arrow_forward_ios_24"
+                android:textColor="@android:color/white"
+                android:tint="@color/white" />
+
+        </RelativeLayout>
     </androidx.cardview.widget.CardView>
 
 

+ 0 - 5
app/src/main/res/layout/main_activity.xml

@@ -56,9 +56,4 @@
             android:text="@string/text_settings"
             android:layout_marginStart="20dp" />
     </com.google.android.material.navigation.NavigationView>
-
-
-
-
-
 </androidx.drawerlayout.widget.DrawerLayout>

+ 1 - 1
app/src/main/res/layout/new_user_welcome_message.xml

@@ -54,7 +54,7 @@
                     android:layout_marginEnd="16dp"
 
                     android:layout_marginRight="16dp"
-                    android:layout_marginBottom="36dp"
+                    android:layout_marginBottom="0dp"
                     android:text="@string/text_ok"
                     app:layout_constraintBottom_toBottomOf="parent"
                     app:layout_constraintEnd_toEndOf="parent"

+ 3 - 0
app/src/main/res/layout/reader_fragment.xml

@@ -29,6 +29,7 @@
                 android:layout_marginStart="0dp"
                 android:background="?attr/selectableItemBackgroundBorderless"
                 android:padding="8dp"
+                android:tint="@android:color/white"
                 android:src="@drawable/ic_baseline_close_24" />
 
             <ImageButton
@@ -40,6 +41,7 @@
                 android:layout_marginLeft="320dp"
                 android:background="?attr/selectableItemBackgroundBorderless"
                 android:padding="8dp"
+                android:tint="@android:color/white"
                 android:src="@drawable/ic_round_pending_24" />
 
             <ImageButton
@@ -54,6 +56,7 @@
                 android:layout_toRightOf="@id/show_message_dots_button"
                 android:background="?attr/selectableItemBackgroundBorderless"
                 android:padding="8dp"
+                android:tint="@android:color/white"
                 android:src="@drawable/ic_baseline_attachment_24" />
 
 

+ 1 - 1
app/src/main/res/menu/main.xml

@@ -3,7 +3,7 @@
     xmlns:app="http://schemas.android.com/apk/res-auto">
     <item
         android:id="@+id/action_information"
-        android:title="@string/action_information"/>
+        android:title="@string/action_about"/>
     <item
         android:id="@+id/action_deletefolder"
         android:orderInCategory="100"

+ 1 - 1
app/src/main/res/values/dimens.xml

@@ -8,5 +8,5 @@
 
     <dimen name="list_item_height">45dp</dimen>
     <dimen name="margin_medium">30dp</dimen>
-    <dimen name="text_size_welcome">22sp</dimen>
+    <dimen name="text_size_welcome">16sp</dimen>
 </resources>

+ 9 - 10
app/src/main/res/values/strings.xml

@@ -6,7 +6,7 @@
 
     <string name="action_deleteFolder">Delete all Folders</string>
     <string name="action_refresh">Refresh</string>
-    <string name="action_information">Information</string>
+    <string name="action_about">About</string>
 
     <string name="drawer_inbox">Inbox</string>
     <string name="drawer_sent">Sent</string>
@@ -39,7 +39,6 @@
     <string name="Beginn">E-mail Beginn</string>
     <string name="date">22. Apr.</string>
 
-    <!--  Text  -->
     <string name="text_add_email">Add Email</string>
     <string name="text_settings">Settings</string>
     <string name="text_save">Save</string>
@@ -51,19 +50,19 @@
     <string name="text_switch_account">Switch to selected account</string>
 
     <string name="text_welcome">
-        Hello friendly user. \n
+        Hello friendly user.
         When creating an account,
         all your messages will be downloaded and
-        \n  you may experience slower performance of the app.
-        When you create a new account, \n
-        you need to open all your folders once \n
+        you may experience slower performance of the app.
+        When you create a new account,
+        you need to open all your folders once
         in order to not find any emails
         from the old account
-        \n afterwards.
-        \n It is the same for the option "Delete All Folders".
-        \n This is a bug which could not be fixed yet.
+        afterwards.
+        It is the same for the option "Delete All Folders".
+        This is a bug which could not be fixed yet.
         We wish you a lot of fun with our app.
-        \n \n
+        \n\n
         This app is in alpha version and created as part of a school project.
         Our app is fully available on Github.
     </string>

+ 5 - 0
app/src/main/res/values/style.xml

@@ -2,6 +2,7 @@
 <resources>
     <!--TODO: change appearance of text when message read -->
     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
+        <item name="actionOverflowButtonStyle">@color/white</item>
         <item name="colorAccent">#3498db</item>
     </style>
     <style name="error_appearance" parent="@android:style/TextAppearance">
@@ -18,4 +19,8 @@
         <item name="android:windowNoTitle">true</item>
         <item name="android:windowAnimationStyle">@style/Theme.AppCompat.Dialog</item>
     </style>
+    <style name="AppToolbar" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
+        <item name="android:textColorPrimary">@android:color/white</item>
+        <item name="android:textColorSecondary">@android:color/black</item>
+    </style>
 </resources>

+ 3 - 1
app/src/main/res/values/themes.xml

@@ -11,6 +11,7 @@
         <item name="colorOnSecondary">@color/black</item>
         <!-- Status bar color. -->
         <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
+        <item name="android:textColorSecondary">@color/white</item>
         <!-- Customize your theme here. -->
     </style>
 
@@ -19,7 +20,8 @@
         <item name="windowNoTitle">true</item>
     </style>
 
-    <style name="Theme.MiniProjekt.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
+    <style name="Theme.MiniProjekt.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
+    </style>
 
     <style name="Theme.MiniProjekt.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
 </resources>