Эх сурвалжийг харах

reformat layouts due to review

AndyScherzinger 7 жил өмнө
parent
commit
637fc68581

+ 24 - 24
src/main/res/layout/grid_image.xml

@@ -16,14 +16,14 @@
   
   
 -->
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:id="@+id/ListItemLayout"
-              android:layout_width="match_parent"
-              android:layout_height="wrap_content"
-              android:layout_gravity="center_horizontal"
-              android:background="@drawable/list_selector"
-              android:foreground="?android:attr/selectableItemBackground"
-              android:gravity="center_horizontal"
-              android:orientation="vertical">
+    android:id="@+id/ListItemLayout"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center_horizontal"
+    android:background="@drawable/list_selector"
+    android:foreground="?android:attr/selectableItemBackground"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
 
 
     <FrameLayout
     <FrameLayout
         android:layout_width="match_parent"
         android:layout_width="match_parent"
@@ -44,19 +44,19 @@
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="top|end"
             android:layout_gravity="top|end"
             android:layout_margin="@dimen/standard_quarter_margin"
             android:layout_margin="@dimen/standard_quarter_margin"
-            android:src="@drawable/badge_favorite"
-            android:contentDescription="@string/favorite_icon" />
+            android:contentDescription="@string/favorite_icon"
+            android:src="@drawable/badge_favorite" />
 
 
         <ImageView
         <ImageView
             android:id="@+id/sharedIcon"
             android:id="@+id/sharedIcon"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="top|end"
             android:layout_gravity="top|end"
-            android:layout_marginTop="@dimen/grid_image_shared_icon_layout_top_margin"
-            android:layout_marginRight="@dimen/standard_quarter_margin"
             android:layout_marginEnd="@dimen/standard_quarter_margin"
             android:layout_marginEnd="@dimen/standard_quarter_margin"
-            android:src="@drawable/shared_via_link"
-            android:contentDescription="@string/shared_via_link_icon" />
+            android:layout_marginRight="@dimen/standard_quarter_margin"
+            android:layout_marginTop="@dimen/grid_image_shared_icon_layout_top_margin"
+            android:contentDescription="@string/shared_via_link_icon"
+            android:src="@drawable/shared_via_link" />
 
 
         <ImageView
         <ImageView
             android:id="@+id/localFileIndicator"
             android:id="@+id/localFileIndicator"
@@ -64,11 +64,11 @@
             android:layout_height="@dimen/grid_image_local_file_indicator_layout_height"
             android:layout_height="@dimen/grid_image_local_file_indicator_layout_height"
             android:layout_gravity="bottom|end"
             android:layout_gravity="bottom|end"
             android:layout_marginBottom="@dimen/standard_quarter_margin"
             android:layout_marginBottom="@dimen/standard_quarter_margin"
-            android:layout_marginRight="@dimen/standard_quarter_margin"
             android:layout_marginEnd="@dimen/standard_quarter_margin"
             android:layout_marginEnd="@dimen/standard_quarter_margin"
+            android:layout_marginRight="@dimen/standard_quarter_margin"
             android:layout_marginTop="@dimen/standard_quarter_margin"
             android:layout_marginTop="@dimen/standard_quarter_margin"
-            android:src="@drawable/ic_synced"
-            android:contentDescription="@string/synced_icon" />
+            android:contentDescription="@string/synced_icon"
+            android:src="@drawable/ic_synced" />
 
 
         <ImageView
         <ImageView
             android:id="@+id/keptOfflineIcon"
             android:id="@+id/keptOfflineIcon"
@@ -76,20 +76,20 @@
             android:layout_height="@dimen/grid_image_kept_offline_icon_layout_height"
             android:layout_height="@dimen/grid_image_kept_offline_icon_layout_height"
             android:layout_gravity="bottom|end"
             android:layout_gravity="bottom|end"
             android:layout_marginBottom="@dimen/standard_quarter_margin"
             android:layout_marginBottom="@dimen/standard_quarter_margin"
-            android:layout_marginRight="@dimen/grid_image_kept_offline_icon_layout_right_end_margin"
             android:layout_marginEnd="@dimen/grid_image_kept_offline_icon_layout_right_end_margin"
             android:layout_marginEnd="@dimen/grid_image_kept_offline_icon_layout_right_end_margin"
-            android:src="@drawable/ic_available_offline"
-            android:contentDescription="@string/available_offline_icon" />
+            android:layout_marginRight="@dimen/grid_image_kept_offline_icon_layout_right_end_margin"
+            android:contentDescription="@string/available_offline_icon"
+            android:src="@drawable/ic_available_offline" />
 
 
         <ImageView
         <ImageView
             android:id="@+id/custom_checkbox"
             android:id="@+id/custom_checkbox"
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical|top"
             android:layout_marginLeft="@dimen/standard_quarter_margin"
             android:layout_marginLeft="@dimen/standard_quarter_margin"
             android:layout_marginRight="@dimen/standard_quarter_margin"
             android:layout_marginRight="@dimen/standard_quarter_margin"
-            android:layout_gravity="center_vertical|top"
-            android:src="@android:drawable/checkbox_off_background"
-            android:contentDescription="@string/checkbox" />
+            android:contentDescription="@string/checkbox"
+            android:src="@android:drawable/checkbox_off_background" />
     </FrameLayout>
     </FrameLayout>
 
 
-</LinearLayout>
+</LinearLayout>

+ 54 - 54
src/main/res/layout/list_item.xml

@@ -18,29 +18,29 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:id="@+id/ListItemLayout"
-              android:layout_width="match_parent"
-              android:background="@drawable/list_selector"
-              android:orientation="vertical"
-              android:foreground="?android:attr/selectableItemBackground"
-              android:layout_height="@dimen/standard_list_item_size"
-              android:descendantFocusability="blocksDescendants">
+    android:id="@+id/ListItemLayout"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/standard_list_item_size"
+    android:background="@drawable/list_selector"
+    android:descendantFocusability="blocksDescendants"
+    android:foreground="?android:attr/selectableItemBackground"
+    android:orientation="vertical">
 
 
     <LinearLayout
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_height="match_parent"
-        android:orientation="horizontal"
-        android:baselineAligned="false">
+        android:baselineAligned="false"
+        android:orientation="horizontal">
 
 
         <RelativeLayout
         <RelativeLayout
             android:layout_width="@dimen/standard_list_item_size"
             android:layout_width="@dimen/standard_list_item_size"
             android:layout_height="@dimen/standard_list_item_size"
             android:layout_height="@dimen/standard_list_item_size"
             android:paddingBottom="@dimen/standard_padding"
             android:paddingBottom="@dimen/standard_padding"
-            android:paddingTop="@dimen/standard_padding"
             android:paddingEnd="@dimen/standard_quarter_padding"
             android:paddingEnd="@dimen/standard_quarter_padding"
+            android:paddingLeft="@dimen/zero"
             android:paddingRight="@dimen/standard_quarter_padding"
             android:paddingRight="@dimen/standard_quarter_padding"
             android:paddingStart="@dimen/zero"
             android:paddingStart="@dimen/zero"
-            android:paddingLeft="@dimen/zero">
+            android:paddingTop="@dimen/standard_padding">
 
 
             <ImageView
             <ImageView
                 android:id="@+id/thumbnail"
                 android:id="@+id/thumbnail"
@@ -49,45 +49,45 @@
                 android:layout_centerInParent="true"
                 android:layout_centerInParent="true"
                 android:layout_marginLeft="@dimen/standard_half_margin"
                 android:layout_marginLeft="@dimen/standard_half_margin"
                 android:layout_marginStart="@dimen/standard_half_margin"
                 android:layout_marginStart="@dimen/standard_half_margin"
-                android:src="@drawable/folder"
-                android:contentDescription="@string/thumbnail"/>
+                android:contentDescription="@string/thumbnail"
+                android:src="@drawable/folder" />
 
 
             <ImageView
             <ImageView
                 android:id="@+id/favorite_action"
                 android:id="@+id/favorite_action"
                 android:layout_width="@dimen/list_item_favorite_action_layout_width"
                 android:layout_width="@dimen/list_item_favorite_action_layout_width"
                 android:layout_height="@dimen/list_item_favorite_action_layout_height"
                 android:layout_height="@dimen/list_item_favorite_action_layout_height"
-                android:layout_alignParentTop="true"
-                android:layout_alignParentRight="true"
                 android:layout_alignParentEnd="true"
                 android:layout_alignParentEnd="true"
-                android:layout_marginRight="@dimen/standard_quarter_margin"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentTop="true"
                 android:layout_marginEnd="@dimen/standard_quarter_margin"
                 android:layout_marginEnd="@dimen/standard_quarter_margin"
+                android:layout_marginRight="@dimen/standard_quarter_margin"
                 android:contentDescription="@string/favorite"
                 android:contentDescription="@string/favorite"
                 android:src="@drawable/badge_favorite" />
                 android:src="@drawable/badge_favorite" />
 
 
             <ImageView
             <ImageView
                 android:id="@+id/keptOfflineIcon"
                 android:id="@+id/keptOfflineIcon"
-                android:layout_height="@dimen/list_item_kept_offline_icon_layout_height"
                 android:layout_width="@dimen/list_item_kept_offline_icon_layout_width"
                 android:layout_width="@dimen/list_item_kept_offline_icon_layout_width"
+                android:layout_height="@dimen/list_item_kept_offline_icon_layout_height"
                 android:layout_alignParentBottom="true"
                 android:layout_alignParentBottom="true"
-                android:layout_alignParentRight="true"
                 android:layout_alignParentEnd="true"
                 android:layout_alignParentEnd="true"
-                android:layout_marginRight="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
+                android:layout_alignParentRight="true"
                 android:layout_marginEnd="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
                 android:layout_marginEnd="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
-                android:src="@drawable/ic_available_offline"
-                android:contentDescription="@string/available_offline_icon"/>
+                android:layout_marginRight="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
+                android:contentDescription="@string/available_offline_icon"
+                android:src="@drawable/ic_available_offline" />
 
 
             <ImageView
             <ImageView
                 android:id="@+id/localFileIndicator"
                 android:id="@+id/localFileIndicator"
                 android:layout_width="@dimen/list_item_local_file_indicator_layout_width"
                 android:layout_width="@dimen/list_item_local_file_indicator_layout_width"
                 android:layout_height="@dimen/list_item_local_file_indicator_layout_height"
                 android:layout_height="@dimen/list_item_local_file_indicator_layout_height"
-                android:src="@drawable/ic_synced"
                 android:layout_alignParentBottom="true"
                 android:layout_alignParentBottom="true"
-                android:layout_alignParentRight="true"
                 android:layout_alignParentEnd="true"
                 android:layout_alignParentEnd="true"
-                android:scaleType="fitCenter"
-                android:contentDescription="@string/downloader_download_succeeded_ticker"
+                android:layout_alignParentRight="true"
+                android:layout_marginEnd="@dimen/standard_quarter_margin"
                 android:layout_marginRight="@dimen/standard_quarter_margin"
                 android:layout_marginRight="@dimen/standard_quarter_margin"
-                android:layout_marginEnd="@dimen/standard_quarter_margin"/>
+                android:contentDescription="@string/downloader_download_succeeded_ticker"
+                android:scaleType="fitCenter"
+                android:src="@drawable/ic_synced" />
 
 
         </RelativeLayout>
         </RelativeLayout>
 
 
@@ -96,8 +96,8 @@
             android:layout_height="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
             android:layout_weight="1"
             android:gravity="top"
             android:gravity="top"
-            android:paddingTop="@dimen/standard_padding"
-            android:orientation="vertical" >
+            android:orientation="vertical"
+            android:paddingTop="@dimen/standard_padding">
 
 
             <TextView
             <TextView
                 android:id="@+id/Filename"
                 android:id="@+id/Filename"
@@ -121,20 +121,20 @@
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
                     android:text="@string/placeholder_fileSize"
                     android:text="@string/placeholder_fileSize"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
-                    android:textSize="@dimen/two_line_secondary_text_size"/>
+                    android:textSize="@dimen/two_line_secondary_text_size" />
 
 
                 <TextView
                 <TextView
                     android:id="@+id/file_separator"
                     android:id="@+id/file_separator"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
-                    android:paddingRight="@dimen/standard_quarter_padding"
+                    android:gravity="end"
                     android:paddingEnd="@dimen/standard_quarter_padding"
                     android:paddingEnd="@dimen/standard_quarter_padding"
                     android:paddingLeft="@dimen/zero"
                     android:paddingLeft="@dimen/zero"
+                    android:paddingRight="@dimen/standard_quarter_padding"
                     android:paddingStart="@dimen/zero"
                     android:paddingStart="@dimen/zero"
-                    android:gravity="end"
                     android:text="@string/info_separator"
                     android:text="@string/info_separator"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
-                    android:textSize="@dimen/two_line_secondary_text_size"/>
+                    android:textSize="@dimen/two_line_secondary_text_size" />
 
 
                 <TextView
                 <TextView
                     android:id="@+id/last_mod"
                     android:id="@+id/last_mod"
@@ -143,7 +143,7 @@
                     android:gravity="end"
                     android:gravity="end"
                     android:text="@string/placeholder_media_time"
                     android:text="@string/placeholder_media_time"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
-                    android:textSize="@dimen/two_line_secondary_text_size"/>
+                    android:textSize="@dimen/two_line_secondary_text_size" />
 
 
             </LinearLayout>
             </LinearLayout>
 
 
@@ -153,56 +153,56 @@
             android:layout_width="wrap_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
             android:layout_gravity="center_vertical"
+            android:paddingEnd="@dimen/zero"
             android:paddingLeft="@dimen/standard_half_padding"
             android:paddingLeft="@dimen/standard_half_padding"
-            android:paddingStart="@dimen/standard_half_padding"
             android:paddingRight="@dimen/zero"
             android:paddingRight="@dimen/zero"
-            android:paddingEnd="@dimen/zero">
+            android:paddingStart="@dimen/standard_half_padding">
 
 
             <ImageView
             <ImageView
                 android:id="@+id/sharedIcon"
                 android:id="@+id/sharedIcon"
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
                 android:layout_height="match_parent"
                 android:layout_centerVertical="true"
                 android:layout_centerVertical="true"
-                android:paddingRight="@dimen/list_item_share_right_margin"
+                android:clickable="true"
+                android:contentDescription="@string/shared_icon"
+                android:focusable="true"
                 android:paddingEnd="@dimen/list_item_share_right_margin"
                 android:paddingEnd="@dimen/list_item_share_right_margin"
                 android:paddingLeft="@dimen/standard_half_padding"
                 android:paddingLeft="@dimen/standard_half_padding"
+                android:paddingRight="@dimen/list_item_share_right_margin"
                 android:paddingStart="@dimen/standard_half_padding"
                 android:paddingStart="@dimen/standard_half_padding"
-                android:clickable="true"
-                android:focusable="true"
-                android:src="@drawable/ic_unshared"
-                android:contentDescription="@string/shared_icon"/>
+                android:src="@drawable/ic_unshared" />
 
 
             <ImageView
             <ImageView
                 android:id="@+id/custom_checkbox"
                 android:id="@+id/custom_checkbox"
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
                 android:layout_height="match_parent"
                 android:layout_centerVertical="true"
                 android:layout_centerVertical="true"
-                android:paddingLeft="@dimen/standard_half_padding"
-                android:paddingStart="@dimen/standard_half_padding"
-                android:paddingRight="@dimen/alternate_padding"
-                android:paddingEnd="@dimen/alternate_padding"
-                android:layout_toRightOf="@id/sharedIcon"
                 android:layout_toEndOf="@id/sharedIcon"
                 android:layout_toEndOf="@id/sharedIcon"
+                android:layout_toRightOf="@id/sharedIcon"
                 android:clickable="false"
                 android:clickable="false"
+                android:contentDescription="@string/checkbox"
                 android:focusable="false"
                 android:focusable="false"
-                android:src="@drawable/ic_checkbox_blank_outline"
-                android:contentDescription="@string/checkbox"/>
+                android:paddingEnd="@dimen/alternate_padding"
+                android:paddingLeft="@dimen/standard_half_padding"
+                android:paddingRight="@dimen/alternate_padding"
+                android:paddingStart="@dimen/standard_half_padding"
+                android:src="@drawable/ic_checkbox_blank_outline" />
 
 
             <ImageView
             <ImageView
                 android:id="@+id/overflow_menu"
                 android:id="@+id/overflow_menu"
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
                 android:layout_height="match_parent"
                 android:layout_centerVertical="true"
                 android:layout_centerVertical="true"
-                android:paddingLeft="@dimen/standard_half_padding"
-                android:paddingStart="@dimen/standard_half_padding"
-                android:layout_toRightOf="@id/custom_checkbox"
                 android:layout_toEndOf="@id/custom_checkbox"
                 android:layout_toEndOf="@id/custom_checkbox"
-                android:paddingRight="@dimen/alternate_padding"
-                android:paddingEnd="@dimen/alternate_padding"
+                android:layout_toRightOf="@id/custom_checkbox"
                 android:clickable="true"
                 android:clickable="true"
+                android:contentDescription="@string/overflow_menu"
                 android:focusable="true"
                 android:focusable="true"
-                android:src="@drawable/ic_dots_vertical"
-                android:contentDescription="@string/overflow_menu"/>
+                android:paddingEnd="@dimen/alternate_padding"
+                android:paddingLeft="@dimen/standard_half_padding"
+                android:paddingRight="@dimen/alternate_padding"
+                android:paddingStart="@dimen/standard_half_padding"
+                android:src="@drawable/ic_dots_vertical" />
 
 
         </RelativeLayout>
         </RelativeLayout>