Sfoglia il codice sorgente

fix codacy warnings

AndyScherzinger 7 anni fa
parent
commit
d643d28c58

+ 7 - 4
src/main/res/layout/account_action.xml

@@ -32,17 +32,20 @@
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
         android:layout_marginLeft="@dimen/list_item_avatar_icon_margin"
-        android:src="@drawable/ic_account_plus"/>
+        android:layout_marginStart="@dimen/list_item_avatar_text_margin"
+        android:src="@drawable/ic_account_plus"
+        android:contentDescription="@string/prefs_add_account"/>
 
     <TextView
         android:id="@+id/user_name"
-        android:layout_width="@dimen/zero"
+        android:layout_width="0dp"
         android:layout_height="fill_parent"
-        android:layout_marginLeft="@dimen/list_item_avatar_text_margin"
+
         android:layout_weight="1"
         android:gravity="center_vertical"
         android:paddingRight="@dimen/standard_padding"
-        android:text="@string/placeholder_sentence"
+        android:paddingLeft="@dimen/standard_padding"
+        android:text="@string/prefs_add_account"
         android:textColor="@color/primary"
         android:textSize="@dimen/two_line_primary_text_size"/>
 

+ 4 - 2
src/main/res/layout/account_item.xml

@@ -43,7 +43,8 @@
             android:layout_marginLeft="12dp"
             android:layout_marginRight="1dp"
             android:layout_marginTop="1dp"
-            android:src="@drawable/folder"/>
+            android:src="@drawable/folder"
+            android:contentDescription="@string/avatar"/>
 
         <ImageView
             android:id="@+id/ticker"
@@ -51,7 +52,8 @@
             android:layout_height="wrap_content"
             android:layout_gravity="bottom|right"
             android:background="@drawable/round_bgnd"
-            android:src="@drawable/ic_account_circle_white_18dp"/>
+            android:src="@drawable/ic_account_circle_white_18dp"
+            android:contentDescription="@string/active_user"/>
     </FrameLayout>
 
     <LinearLayout

+ 2 - 0
src/main/res/values/strings.xml

@@ -163,6 +163,8 @@
     <string name="delete_account">Remove account</string>
     <string name="delete_account_warning">Delete account %s with all local files?\n\nDeleting cannot be undone.</string>
     <string name="create_account">Create account</string>
+    <string name="avatar">Avatar</string>
+    <string name="active_user">Active user</string>
     <string name="upload_chooser_title">Upload from &#8230;</string>
     <string name="uploader_info_dirname">Folder name</string>
     <string name="uploader_upload_in_progress_ticker">Uploading &#8230;</string>