瀏覽代碼

add content description, align layouts

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 4 年之前
父節點
當前提交
5a58034a0b

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

@@ -65,7 +65,6 @@
             <androidx.appcompat.widget.AppCompatTextView
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:paddingStart="@dimen/standard_half_padding"
                 android:text="@string/scope_private_description"
                 android:textColor="@color/textColorMaxContrast"
                 android:textSize="14sp" />

+ 14 - 8
app/src/main/res/layout/rv_item_browser_file.xml

@@ -19,9 +19,10 @@
   -->
 
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_margin="@dimen/double_margin_between_elements"
     android:background="@color/bg_default">
 
@@ -38,17 +39,18 @@
 
     <ImageView
         android:id="@+id/fileFavoriteImageView"
-        android:layout_width="8dp"
-        android:layout_height="8dp"
+        android:layout_width="16dp"
+        android:layout_height="16dp"
         android:layout_below="@id/file_icon"
         android:layout_alignEnd="@id/file_icon"
+        android:contentDescription="@string/starred"
         android:src="@drawable/ic_star_black_24dp"
-        app:tint="@color/grey_600" />
+        app:tint="@color/favorite_icon_tint" />
 
     <ImageView
         android:id="@+id/fileEncryptedImageView"
-        android:layout_width="8dp"
-        android:layout_height="8dp"
+        android:layout_width="16dp"
+        android:layout_height="16dp"
         android:layout_below="@id/file_icon"
         android:layout_alignStart="@+id/file_icon"
         android:src="@drawable/ic_lock_grey600_24px" />
@@ -66,7 +68,9 @@
         android:marqueeRepeatLimit="1"
         android:paddingBottom="6dp"
         android:singleLine="true"
-        android:textSize="12sp" />
+        android:textColor="@color/textColorMaxContrast"
+        android:textSize="12sp"
+        tools:text="3 minutes ago" />
 
     <TextView
         android:id="@+id/filename_text_view"
@@ -80,7 +84,9 @@
         android:marqueeRepeatLimit="1"
         android:paddingTop="6dp"
         android:singleLine="true"
-        android:textSize="16sp" />
+        android:textColor="@color/conversation_item_header"
+        android:textSize="@dimen/two_line_primary_text_size"
+        tools:text="filename.md" />
 
     <com.facebook.drawee.view.SimpleDraweeView
         android:id="@+id/file_icon"

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

@@ -21,33 +21,32 @@
   -->
 
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="72dp"
+    android:layout_height="wrap_content"
     android:layout_margin="@dimen/standard_margin">
 
     <FrameLayout
         android:id="@+id/frame_layout"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
+        android:layout_width="@dimen/small_item_height"
+        android:layout_height="@dimen/small_item_height"
         android:layout_centerVertical="true"
         android:layout_marginEnd="@dimen/margin_between_elements">
 
         <ImageView
             android:id="@+id/password_protected_image_view"
-            android:layout_width="10dp"
-            android:layout_height="10dp"
+            android:layout_width="16dp"
+            android:layout_height="16dp"
             android:layout_gravity="bottom|end"
-            android:layout_marginEnd="6dp"
-            android:layout_marginBottom="6dp"
+            android:contentDescription="@string/password_protected"
             android:src="@drawable/ic_lock_white_24px"
             android:visibility="visible" />
 
-        <com.facebook.drawee.view.SimpleDraweeView xmlns:app="http://schemas.android.com/apk/res-auto"
+        <com.facebook.drawee.view.SimpleDraweeView
             android:id="@+id/avatar_image"
             android:layout_width="@dimen/small_item_height"
             android:layout_height="@dimen/small_item_height"
-            android:layout_margin="@dimen/margin_between_elements"
             app:roundAsCircle="true" />
 
     </FrameLayout>
@@ -55,7 +54,7 @@
     <ImageButton
         android:id="@+id/more_menu"
         android:layout_width="wrap_content"
-        android:layout_height="match_parent"
+        android:layout_height="@dimen/small_item_height"
         android:layout_alignParentEnd="true"
         android:layout_centerVertical="true"
         android:layout_marginStart="@dimen/standard_margin"
@@ -78,7 +77,8 @@
             android:layout_height="wrap_content"
             android:ellipsize="middle"
             android:singleLine="true"
-            android:textAppearance="?android:attr/textAppearanceListItem"
+            android:textColor="@color/conversation_item_header"
+            android:textSize="@dimen/two_line_primary_text_size"
             tools:text="Call item text" />
 
         <androidx.emoji.widget.EmojiTextView
@@ -86,7 +86,8 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:singleLine="true"
-            android:textColor="?android:attr/textColorSecondary"
+            android:textColor="@color/textColorMaxContrast"
+            android:textSize="14sp"
             tools:text="A week ago" />
 
     </LinearLayout>

+ 4 - 2
app/src/main/res/layout/rv_item_conversation_info_participant.xml

@@ -38,7 +38,8 @@
             android:layout_height="12dp"
             android:layout_gravity="bottom|end"
             android:background="@drawable/shape_lock_bubble"
-            android:visibility="gone" />
+            android:visibility="gone"
+            tools:visibility="visible" />
 
         <ImageView
             android:id="@+id/videoCallImageView"
@@ -46,7 +47,8 @@
             android:layout_height="12dp"
             android:layout_gravity="top|end"
             android:background="@drawable/shape_favorite_bubble"
-            android:visibility="gone" />
+            android:visibility="gone"
+            tools:visibility="visible" />
 
         <com.facebook.drawee.view.SimpleDraweeView
             android:id="@+id/simple_drawee_view"

+ 4 - 2
app/src/main/res/layout/rv_item_conversation_with_last_message.xml

@@ -51,16 +51,18 @@
                 android:layout_width="16dp"
                 android:layout_height="16dp"
                 android:layout_gravity="bottom|end"
-                android:background="@drawable/shape_lock_bubble" />
+                android:background="@drawable/shape_lock_bubble"
+                android:contentDescription="@string/password_protected" />
 
             <ImageView
                 android:id="@+id/favoriteConversationImageView"
                 android:layout_width="16dp"
                 android:layout_height="16dp"
                 android:layout_gravity="top|end"
+                android:contentDescription="@string/starred"
                 android:src="@drawable/ic_star_black_24dp"
                 app:tint="@color/favorite_icon_tint"
-                app:tintMode="src_in"/>
+                app:tintMode="src_in" />
 
         </FrameLayout>
 

+ 4 - 1
app/src/main/res/values/strings.xml

@@ -361,7 +361,10 @@
     <string name="no_phone_book_integration_due_to_permissions">No phone number integration due to missing permissions</string>
     <string name="nc_phone_book_integration_chat_via">Chat via %s</string>
     <string name="nc_phone_book_integration_account_not_found">Account not found</string>
-   
+
+    <string name="starred">Favorite</string>
+    <string name="password_protected">Password protected</string>
+
     <string name="avatar">Avatar</string>
     <string name="account_icon">Account icon</string>
     <string name="userinfo_no_info_headline">No personal info set</string>

+ 1 - 1
scripts/analysis/lint-results.txt

@@ -1,2 +1,2 @@
 DO NOT TOUCH; GENERATED BY DRONE
-      <span class="mdl-layout-title">Lint Report: 3 errors and 122 warnings</span>
+      <span class="mdl-layout-title">Lint Report: 3 errors and 117 warnings</span>