Jelajahi Sumber

harmonize text sizes, make active tab easier to discover

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 4 tahun lalu
induk
melakukan
b286740148

+ 2 - 1
src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java

@@ -231,7 +231,8 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
         binding.tabLayout.addTab(binding.tabLayout.newTab().setText(R.string.share_dialog_title));
 
         binding.tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
-        binding.tabLayout.setSelectedTabIndicatorColor(ThemeUtils.primaryAccentColor(getContext()));
+        binding.tabLayout.setSelectedTabIndicatorColor(ThemeUtils.primaryColor(getContext()));
+        binding.tabLayout.setTabTextColors(getResources().getColor(R.color.text_color), ThemeUtils.primaryColor(getContext()));
 
         final FileDetailTabAdapter adapter = new FileDetailTabAdapter(getFragmentManager(), getFile(), user);
         binding.pager.setAdapter(adapter);

+ 3 - 0
src/main/res/layout/activity_list_item.xml

@@ -53,6 +53,7 @@
             android:paddingTop="@dimen/standard_padding"
             android:paddingEnd="@dimen/zero"
             android:textAppearance="?android:attr/textAppearanceListItem"
+            android:textSize="@dimen/two_line_primary_text_size"
             tools:text="@string/placeholder_filename" />
 
         <TextView
@@ -63,6 +64,7 @@
             android:paddingStart="@dimen/activity_icon_layout_right_end_margin"
             android:paddingEnd="@dimen/zero"
             android:textAppearance="?android:attr/textAppearanceListItem"
+            android:textSize="@dimen/two_line_primary_text_size"
             tools:text="@string/placeholder_sentence" />
 
         <GridLayout
@@ -84,6 +86,7 @@
             android:paddingStart="@dimen/activity_icon_layout_right_end_margin"
             android:paddingEnd="@dimen/zero"
             android:textColor="?android:attr/textColorSecondary"
+            android:textSize="@dimen/two_line_primary_text_size"
             tools:text="@string/placeholder_sentence" />
 
     </LinearLayout>

+ 4 - 3
src/main/res/layout/file_details_fragment.xml

@@ -68,7 +68,7 @@
                     android:id="@+id/size"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:textSize="16sp"
+                    android:textSize="@dimen/two_line_primary_text_size"
                     tools:text="@string/placeholder_fileSize" />
 
                 <TextView
@@ -80,14 +80,14 @@
                     android:paddingEnd="@dimen/standard_quarter_padding"
                     android:text="@string/info_separator"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
-                    android:textSize="@dimen/two_line_secondary_text_size" />
+                    android:textSize="@dimen/two_line_primary_text_size" />
 
                 <TextView
                     android:id="@+id/last_modification_timestamp"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:gravity="end"
-                    android:textSize="16sp"
+                    android:textSize="@dimen/two_line_primary_text_size"
                     tools:text="@string/placeholder_media_time" />
 
                 <ImageView
@@ -140,6 +140,7 @@
                 android:id="@+id/progressText"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
+                android:textSize="@dimen/two_line_primary_text_size"
                 android:text="@string/downloader_download_in_progress_ticker" />
 
             <ProgressBar

+ 6 - 4
src/main/res/layout/file_details_share_group.xml

@@ -44,22 +44,24 @@
         android:src="@drawable/ic_external" />
 
     <LinearLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/standard_half_margin"
-        android:layout_width="match_parent"
         android:orientation="vertical">
 
         <TextView
             android:id="@+id/shareInternalLink"
-            android:layout_height="wrap_content"
             android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
             android:text="@string/share_internal_link"
-            android:textColor="@color/text_color" />
+            android:textColor="@color/text_color"
+            android:textSize="@dimen/two_line_primary_text_size" />
 
         <TextView
             android:id="@+id/shareInternalLinkText"
-            android:layout_height="wrap_content"
             android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="@dimen/two_line_primary_text_size"
             tools:text="@string/share_internal_link_to_folder_text" />
     </LinearLayout>
 

+ 6 - 4
src/main/res/layout/file_details_share_internal_share_link.xml

@@ -45,22 +45,24 @@
         android:src="@drawable/ic_external" />
 
     <LinearLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/standard_half_margin"
-        android:layout_width="match_parent"
         android:orientation="vertical">
 
         <TextView
             android:id="@+id/shareInternalLink"
-            android:layout_height="wrap_content"
             android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
             android:text="@string/share_internal_link"
-            android:textColor="@color/text_color" />
+            android:textColor="@color/text_color"
+            android:textSize="@dimen/two_line_primary_text_size" />
 
         <TextView
             android:id="@+id/shareInternalLinkText"
-            android:layout_height="wrap_content"
             android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="@dimen/two_line_primary_text_size"
             tools:text="@string/share_internal_link_to_folder_text" />
     </LinearLayout>
 

+ 1 - 1
src/main/res/layout/file_details_share_link_share_item.xml

@@ -50,7 +50,7 @@
         android:singleLine="true"
         android:layout_weight="1"
         android:gravity="center_vertical"
-        android:textSize="@dimen/file_details_username_text_size"
+        android:textSize="@dimen/two_line_primary_text_size"
         android:text="@string/share_via_link_section_title" />
 
     <ImageView

+ 2 - 1
src/main/res/layout/file_details_share_public_link_add_new_item.xml

@@ -44,7 +44,8 @@
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical"
         android:layout_weight="1"
-        android:text="@string/share_via_link_section_title" />
+        android:text="@string/share_via_link_section_title"
+        android:textSize="@dimen/two_line_primary_text_size" />
 
     <ImageView
         android:id="@+id/add_new_public_share_link"

+ 1 - 1
src/main/res/layout/file_details_share_share_item.xml

@@ -49,7 +49,7 @@
         android:singleLine="true"
         android:layout_weight="1"
         android:gravity="center_vertical"
-        android:textSize="@dimen/file_details_username_text_size"
+        android:textSize="@dimen/two_line_primary_text_size"
         android:text="@string/username" />
 
     <ImageView

+ 1 - 1
src/main/res/layout/file_details_sharing_fragment.xml

@@ -63,7 +63,7 @@
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent"
                 android:text="@string/shared_with_you_by"
-                android:textSize="16sp" />
+                android:textSize="@dimen/two_line_primary_text_size" />
 
             <LinearLayout
                 android:id="@+id/shared_with_you_note_container"

+ 0 - 1
src/main/res/values/dims.xml

@@ -101,7 +101,6 @@
     <dimen name="contactlist_item_icon_layout_height">40dp</dimen>
     <dimen name="empty_list_icon_layout_width">72dp</dimen>
     <dimen name="empty_list_icon_layout_height">72dp</dimen>
-    <dimen name="file_details_username_text_size">16sp</dimen>
     <dimen name="grid_image_shared_icon_layout_top_margin">24dp</dimen>
     <dimen name="grid_image_local_file_indicator_layout_width">16dp</dimen>
     <dimen name="grid_image_local_file_indicator_layout_height">16dp</dimen>