Przeglądaj źródła

Added icons on about screen

sirekanyan 8 lat temu
rodzic
commit
da1f8dedd6

+ 5 - 0
app/src/main/res/drawable/ic_about_api.xml

@@ -0,0 +1,5 @@
+<vector android:alpha="0.30" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM11,19.93c-3.95,-0.49 -7,-3.85 -7,-7.93 0,-0.62 0.08,-1.21 0.21,-1.79L9,15v1c0,1.1 0.9,2 2,2v1.93zM17.9,17.39c-0.26,-0.81 -1,-1.39 -1.9,-1.39h-1v-3c0,-0.55 -0.45,-1 -1,-1L8,12v-2h2c0.55,0 1,-0.45 1,-1L11,7h2c1.1,0 2,-0.9 2,-2v-0.41c2.93,1.19 5,4.06 5,7.41 0,2.08 -0.8,3.97 -2.1,5.39z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_about_designer.xml

@@ -0,0 +1,5 @@
+<vector android:alpha="0.30" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
+</vector>

+ 5 - 0
app/src/main/res/drawable/ic_about_developer.xml

@@ -0,0 +1,5 @@
+<vector android:alpha="0.30" android:height="24dp"
+    android:viewportHeight="24.0" android:viewportWidth="24.0"
+    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="#FF000000" android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/>
+</vector>

+ 13 - 12
app/src/main/res/layout/about.xml

@@ -1,24 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="center"
-    android:foreground="?android:attr/selectableItemBackground"
     android:clickable="true"
     android:focusable="true"
+    android:foreground="?android:attr/selectableItemBackground"
     android:orientation="vertical"
-    android:paddingBottom="16dp"
-    android:paddingLeft="32dp"
-    android:paddingRight="32dp"
-    android:paddingTop="16dp">
+    android:padding="16dp">
 
     <ImageView
         android:layout_width="64dp"
         android:layout_height="64dp"
         android:layout_gravity="center_horizontal"
         android:src="@mipmap/ic_launcher"
-        tools:ignore="ContentDescription" />
+        tools:ignore="ContentDescription"/>
 
     <TextView
         android:layout_width="wrap_content"
@@ -26,7 +24,7 @@
         android:layout_gravity="center_horizontal"
         android:layout_marginTop="4dp"
         android:text="@string/app_name"
-        android:textSize="16sp" />
+        android:textSize="16sp"/>
 
     <TextView
         android:id="@+id/about_app_version"
@@ -34,7 +32,7 @@
         android:layout_height="wrap_content"
         android:layout_gravity="center_horizontal"
         android:textSize="12sp"
-        tools:text="1.0.0" />
+        tools:text="1.0.0"/>
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -45,15 +43,18 @@
 
         <TextView
             style="@style/AboutItem"
-            android:text="@string/about_idea" />
+            android:drawableStart="@drawable/ic_about_api"
+            android:text="@string/about_idea"/>
 
         <TextView
             style="@style/AboutItem"
-            android:text="@string/about_developer" />
+            android:drawableStart="@drawable/ic_about_developer"
+            android:text="@string/about_developer"/>
 
         <TextView
             style="@style/AboutItem"
-            android:text="@string/about_designer" />
+            android:drawableStart="@drawable/ic_about_designer"
+            android:text="@string/about_designer"/>
 
     </LinearLayout>
 

+ 3 - 3
app/src/main/res/values/strings.xml

@@ -43,9 +43,9 @@
     <string name="book_hint_notes">Notes</string>
 
     <!-- about -->
-    <string name="about_idea">API\nhttp://knigopis.com</string>
-    <string name="about_developer">Development\nvadik@sirekanyan.com</string>
-    <string name="about_designer">Design\nanna@sirekanyan.com</string>
+    <string name="about_idea">API:\nhttp://knigopis.com</string>
+    <string name="about_developer">Development:\nvadik@sirekanyan.com</string>
+    <string name="about_designer">Design:\nanna@sirekanyan.com</string>
 
     <!-- error -->
     <string name="error_unauthorized">Welcome to Knigopis! Please log in.</string>

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

@@ -23,8 +23,9 @@
         <item name="android:layout_height">wrap_content</item>
         <item name="android:layout_width">match_parent</item>
         <item name="android:autoLink">web|email</item>
-        <item name="android:padding">4dp</item>
+        <item name="android:padding">8dp</item>
         <item name="android:textSize">14sp</item>
+        <item name="android:drawablePadding">8dp</item>
     </style>
 
     <style name="WhiteAccent">