From 52a26abf0ca6e671dcc2e1125640590f1816179a Mon Sep 17 00:00:00 2001 From: Martin Brabham Date: Tue, 27 Jan 2015 15:27:12 -0800 Subject: Support RTL layouts everywhere. - Fix custom title text clipping. - Fix breadcrumbs - Remove FSO Dialog permission spinner width adjustment that did not function on RTL. - Fix history and bookmarks items to align properly. - Update layouts to function with RTL Change-Id: I3cd4032887371509ec2847bae6f889558664a356 (cherry picked from commit d0d367d2d681e2372813a81246dea45eab572ce2) --- res/layout/associations_dialog.xml | 4 +- res/layout/bookmarks_item.xml | 4 +- res/layout/breadcrumb_view.xml | 20 +-- res/layout/compute_checksum_dialog.xml | 48 +++---- res/layout/dialog_message.xml | 2 +- res/layout/dialog_title.xml | 12 +- res/layout/disk_usage_category_view.xml | 2 +- res/layout/editor.xml | 2 +- res/layout/execution_dialog.xml | 12 +- res/layout/filesystem_info_dialog.xml | 96 ++++++------- res/layout/fso_properties_dialog.xml | 150 ++++++++++----------- res/layout/history_item.xml | 4 +- res/layout/initial_directory.xml | 18 +-- res/layout/inline_autocomplete.xml | 14 +- res/layout/input_name_dialog.xml | 18 +-- res/layout/menu_item.xml | 12 +- res/layout/message_progress_dialog.xml | 18 +-- res/layout/navigation_drawer.xml | 16 +-- .../navigation_view_customtitle_breadcrumb.xml | 4 +- .../navigation_view_customtitle_configuration.xml | 8 +- res/layout/navigation_view_details_item.xml | 12 +- res/layout/navigation_view_icons_item.xml | 6 +- res/layout/navigation_view_selectionbar.xml | 8 +- res/layout/navigation_view_simple_item.xml | 9 +- res/layout/navigation_view_statusbar.xml | 8 +- res/layout/option_list_item.xml | 12 +- res/layout/picker.xml | 8 +- res/layout/search.xml | 21 ++- res/layout/search_item.xml | 30 ++--- res/layout/search_spinner_item.xml | 2 +- res/layout/simple_customtitle.xml | 14 +- res/layout/spinner_item.xml | 2 +- res/layout/two_columns_menu_item.xml | 12 +- res/layout/unlock_dialog_message.xml | 24 ++-- res/values/dimen.xml | 2 +- res/values/styles.xml | 12 +- .../ui/dialogs/FsoPropertiesDialog.java | 25 ---- 37 files changed, 325 insertions(+), 346 deletions(-) diff --git a/res/layout/associations_dialog.xml b/res/layout/associations_dialog.xml index 18009c9d..e8b9d04c 100644 --- a/res/layout/associations_dialog.xml +++ b/res/layout/associations_dialog.xml @@ -32,8 +32,8 @@ @@ -43,6 +43,7 @@ android:id="@+id/bookmarks_item_name" android:layout_width="match_parent" android:layout_height="wrap_content" + android:textAlignment="viewStart" android:singleLine="true" android:textAppearance="@style/primary_text_appearance" /> @@ -50,6 +51,7 @@ android:id="@+id/bookmarks_item_path" android:layout_width="match_parent" android:layout_height="wrap_content" + android:textAlignment="viewStart" android:singleLine="true" android:textAppearance="@style/secondary_text_appearance" /> diff --git a/res/layout/breadcrumb_view.xml b/res/layout/breadcrumb_view.xml index 21b5f581..cd0b530f 100644 --- a/res/layout/breadcrumb_view.xml +++ b/res/layout/breadcrumb_view.xml @@ -34,8 +34,8 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignBottom="@id/ab_filesystem_info" - android:layout_alignLeft="@id/ab_filesystem_info" - android:layout_alignRight="@id/ab_filesystem_info" + android:layout_alignStart="@id/ab_filesystem_info" + android:layout_alignEnd="@id/ab_filesystem_info" android:layout_alignTop="@id/ab_filesystem_info" android:layout_centerHorizontal="true" android:layout_centerVertical="true" @@ -49,7 +49,7 @@ android:id="@+id/breadcrumb_scrollview" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_toRightOf="@id/ab_filesystem_info" + android:layout_toEndOf="@id/ab_filesystem_info" android:scrollbars="none" > + android:paddingStart="@dimen/small_margin" + android:paddingEnd="@dimen/small_margin" /> - \ No newline at end of file + diff --git a/res/layout/compute_checksum_dialog.xml b/res/layout/compute_checksum_dialog.xml index fcbd8218..6e63e72a 100644 --- a/res/layout/compute_checksum_dialog.xml +++ b/res/layout/compute_checksum_dialog.xml @@ -24,10 +24,10 @@ android:id="@+id/checksum_filename_label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:layout_marginTop="@dimen/extra_large_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:text="@string/compute_checksum_filename_label" android:textAppearance="@style/primary_text_appearance" /> @@ -35,34 +35,34 @@ android:id="@+id/checksum_filename" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" - android:gravity="left|center_vertical" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" + android:gravity="start|center_vertical" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin"> @@ -88,18 +88,18 @@ android:id="@+id/checksum_sha1_label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:layout_marginTop="@dimen/extra_large_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:text="@string/compute_checksum_sha1_label" android:textAppearance="@style/primary_text_appearance" /> diff --git a/res/layout/dialog_message.xml b/res/layout/dialog_message.xml index 69abae38..97050956 100644 --- a/res/layout/dialog_message.xml +++ b/res/layout/dialog_message.xml @@ -24,7 +24,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/extra_large_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:textAppearance="@style/primary_text_appearance" android:textStyle="normal" /> diff --git a/res/layout/dialog_title.xml b/res/layout/dialog_title.xml index 67b10b5c..c192c159 100644 --- a/res/layout/dialog_title.xml +++ b/res/layout/dialog_title.xml @@ -23,7 +23,7 @@ android:layout_width="@dimen/smallest_row_height" android:layout_height="@dimen/smallest_row_height" android:layout_gravity="center_vertical" - android:layout_marginLeft="@dimen/extra_margin" + android:layout_marginStart="@dimen/extra_margin" android:contentDescription="@null" android:height="@dimen/smallest_row_height" android:width="@dimen/smallest_row_height" @@ -31,11 +31,11 @@ - \ No newline at end of file + diff --git a/res/layout/disk_usage_category_view.xml b/res/layout/disk_usage_category_view.xml index 5b4c5c43..a2e20b01 100644 --- a/res/layout/disk_usage_category_view.xml +++ b/res/layout/disk_usage_category_view.xml @@ -30,7 +30,7 @@ diff --git a/res/layout/editor.xml b/res/layout/editor.xml index 557a5cf7..e7de11f2 100644 --- a/res/layout/editor.xml +++ b/res/layout/editor.xml @@ -42,7 +42,7 @@ android:layout_height="wrap_content" android:singleLine="false" android:maxLength="@integer/editor_max_file_size" - android:gravity="top|left" + android:gravity="top|start" android:cursorVisible="true" android:background="@null" android:imeOptions="actionDone|flagNoFullscreen" diff --git a/res/layout/execution_dialog.xml b/res/layout/execution_dialog.xml index b6adc0c8..cc2161b5 100644 --- a/res/layout/execution_dialog.xml +++ b/res/layout/execution_dialog.xml @@ -30,7 +30,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:text="@string/execution_console_script_name_label" android:textAppearance="@style/primary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -103,7 +103,7 @@ android:id="@+id/filesystem_info_status" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="left" + android:layout_gravity="start" android:layout_margin="@dimen/default_margin" android:textOff="@string/mount_point_readonly" android:textOn="@string/mount_point_readwrite" /> @@ -111,40 +111,40 @@ + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -153,23 +153,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -178,23 +178,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -203,8 +203,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:maxLines="5" android:textAppearance="@style/secondary_text_appearance" /> @@ -212,15 +212,15 @@ + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -229,8 +229,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> @@ -241,12 +241,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:contentDescription="@null" - android:drawableLeft="@drawable/ic_material_light_fs_warning" + android:drawableStart="@drawable/ic_material_light_fs_warning" android:drawablePadding="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:singleLine="false" android:background="@drawable/material_selector" android:text="@string/filesystem_info_mount_not_allowed_msg" @@ -275,22 +275,22 @@ android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight=".70" - android:layout_gravity="left|center_vertical" + android:layout_gravity="start|center_vertical" android:paddingBottom="@dimen/extra_large_margin" android:paddingTop="@dimen/default_margin" android:shrinkColumns="1" > + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -299,21 +299,21 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -322,21 +322,21 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -345,7 +345,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:textAppearance="@style/secondary_text_appearance" /> diff --git a/res/layout/fso_properties_dialog.xml b/res/layout/fso_properties_dialog.xml index 45609626..a737db59 100644 --- a/res/layout/fso_properties_dialog.xml +++ b/res/layout/fso_properties_dialog.xml @@ -85,15 +85,15 @@ + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -102,23 +102,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -127,8 +127,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:maxLines="5" android:textAppearance="@style/secondary_text_appearance" /> @@ -136,15 +136,15 @@ + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -153,8 +153,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> @@ -162,15 +162,15 @@ + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -179,8 +179,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> @@ -188,8 +188,8 @@ @@ -206,23 +206,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -231,8 +231,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> @@ -240,8 +240,8 @@ @@ -258,23 +258,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -283,23 +283,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -308,23 +308,23 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -333,8 +333,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" android:singleLine="false" android:textAppearance="@style/secondary_text_appearance" /> @@ -342,15 +342,15 @@ + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin"> @@ -359,8 +359,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:paddingRight="@dimen/double_margin" - android:gravity="left|center_vertical" /> + android:paddingEnd="@dimen/double_margin" + android:gravity="start|center_vertical" /> @@ -388,15 +388,15 @@ + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -405,22 +405,22 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:spinnerMode="dialog" android:textAppearance="@style/secondary_text_appearance" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -429,7 +429,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:spinnerMode="dialog" android:textAppearance="@style/secondary_text_appearance" /> @@ -451,8 +451,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" > + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" > @@ -498,7 +498,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:text="@string/fso_properties_dialog_group" android:textAppearance="@style/primary_text_appearance" /> @@ -516,7 +516,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:text="@string/fso_properties_dialog_others" android:textAppearance="@style/primary_text_appearance" /> @@ -651,12 +651,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:contentDescription="@null" - android:drawableLeft="@drawable/ic_material_light_fs_warning" + android:drawableStart="@drawable/ic_material_light_fs_warning" android:drawablePadding="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:singleLine="false" android:background="@drawable/material_selector" android:text="@string/fso_properties_permissions_not_allowed_msg" diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml index df28b3b3..fff78f2e 100644 --- a/res/layout/history_item.xml +++ b/res/layout/history_item.xml @@ -27,7 +27,7 @@ android:id="@+id/history_item_icon" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginRight="2dp" + android:layout_marginEnd="2dp" android:contentDescription="@null" android:padding="8dp" android:src="@null" /> @@ -43,6 +43,7 @@ android:id="@+id/history_item_name" android:layout_width="match_parent" android:layout_height="wrap_content" + android:textAlignment="viewStart" android:ellipsize="end" android:singleLine="true" android:textAppearance="@style/primary_text_appearance" /> @@ -51,6 +52,7 @@ android:id="@+id/history_item_directory" android:layout_width="match_parent" android:layout_height="wrap_content" + android:textAlignment="viewStart" android:singleLine="true" android:ellipsize="middle" android:textAppearance="@style/secondary_text_appearance" /> diff --git a/res/layout/initial_directory.xml b/res/layout/initial_directory.xml index 78acb4b7..a297f3ad 100644 --- a/res/layout/initial_directory.xml +++ b/res/layout/initial_directory.xml @@ -23,9 +23,9 @@ android:id="@+id/initial_directory_label" android:layout_width="wrap_content" android:layout_height="@dimen/default_row_height" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" - android:gravity="left|center_vertical" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" + android:gravity="start|center_vertical" android:text="@string/initial_directory_label" android:textAppearance="@style/primary_text_appearance" android:textStyle="normal" /> @@ -35,20 +35,20 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/extra_large_margin" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" /> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" /> @@ -37,8 +37,8 @@ android:textSize="@dimen/primary_text_size" android:textStyle="normal" android:layout_marginBottom="@dimen/extra_large_margin" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:ems="@integer/default_edit_text_ems" android:imeOptions="actionDone|flagNoFullscreen" android:scrollHorizontally="true" @@ -53,12 +53,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:contentDescription="@null" - android:drawableLeft="@drawable/ic_material_light_fs_warning" + android:drawableStart="@drawable/ic_material_light_fs_warning" android:drawablePadding="@dimen/default_margin" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:singleLine="false" android:text="@null" android:textAppearance="@style/secondary_text_appearance" diff --git a/res/layout/menu_item.xml b/res/layout/menu_item.xml index b181eac1..320ace96 100644 --- a/res/layout/menu_item.xml +++ b/res/layout/menu_item.xml @@ -26,25 +26,25 @@ android:id="@+id/menu_item_check" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:layout_centerVertical="true" android:contentDescription="@null" android:focusable="false" android:focusableInTouchMode="false" - android:paddingRight="@dimen/extra_margin" + android:paddingEnd="@dimen/extra_margin" android:src="@drawable/checkable_selector" /> diff --git a/res/layout/message_progress_dialog.xml b/res/layout/message_progress_dialog.xml index 2665c9a0..e0fa2a56 100644 --- a/res/layout/message_progress_dialog.xml +++ b/res/layout/message_progress_dialog.xml @@ -24,7 +24,7 @@ android:layout_width="@dimen/smallest_row_height" android:layout_height="@dimen/smallest_row_height" android:layout_centerVertical="true" - android:layout_marginLeft="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" android:indeterminate="true" android:indeterminateOnly="true" /> @@ -32,10 +32,10 @@ android:id="@+id/message_progress_dialog_label" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="@dimen/default_margin" - android:layout_marginRight="@dimen/extra_large_margin" - android:layout_toRightOf="@id/message_progress_dialog_waiting" - android:gravity="left|center_vertical" + android:layout_marginStart="@dimen/default_margin" + android:layout_marginEnd="@dimen/extra_large_margin" + android:layout_toEndOf="@id/message_progress_dialog_waiting" + android:gravity="start|center_vertical" android:minHeight="@dimen/smallest_row_height" android:singleLine="false" android:text="@null" @@ -47,10 +47,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/message_progress_dialog_label" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" - android:layout_toRightOf="@id/message_progress_dialog_waiting" - android:gravity="left|center_vertical" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" + android:layout_toEndOf="@id/message_progress_dialog_waiting" + android:gravity="start|center_vertical" android:minHeight="@dimen/smallest_row_height" android:singleLine="false" android:minLines="4" diff --git a/res/layout/navigation_drawer.xml b/res/layout/navigation_drawer.xml index e319fd37..e4d39170 100644 --- a/res/layout/navigation_drawer.xml +++ b/res/layout/navigation_drawer.xml @@ -34,7 +34,7 @@ android:id="@+id/ab_settings" android:layout_width="@dimen/default_buttom_width" android:layout_height="match_parent" - android:layout_alignParentLeft="true" + android:layout_alignParentEnd="true" android:contentDescription="@string/menu_settings" android:onClick="onActionBarItemClick" android:src="@drawable/ic_material_light_settings"/> @@ -43,7 +43,7 @@ android:id="@+id/ab_clear_history" android:layout_width="@dimen/default_buttom_width" android:layout_height="match_parent" - android:layout_toRightOf="@id/ab_settings" + android:layout_toEndOf="@id/ab_settings" android:contentDescription="@string/menu_clear_history" android:onClick="onActionBarItemClick" android:src="@drawable/ic_material_light_delete"/> @@ -79,7 +79,7 @@ android:scaleType="centerCrop"/> @@ -193,4 +193,4 @@ - \ No newline at end of file + diff --git a/res/layout/navigation_view_customtitle_breadcrumb.xml b/res/layout/navigation_view_customtitle_breadcrumb.xml index c6bf5153..0e9a6bae 100644 --- a/res/layout/navigation_view_customtitle_breadcrumb.xml +++ b/res/layout/navigation_view_customtitle_breadcrumb.xml @@ -24,7 +24,7 @@ style="@style/breadcrumb_actionbar_buttom" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:contentDescription="@null" android:onClick="onActionBarItemClick" android:src="@drawable/ic_material_light_expander_open" /> @@ -33,6 +33,6 @@ android:id="@+id/breadcrumb_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_toLeftOf="@id/ab_configuration" /> + android:layout_toStartOf="@id/ab_configuration" /> diff --git a/res/layout/navigation_view_customtitle_configuration.xml b/res/layout/navigation_view_customtitle_configuration.xml index a5b50d3f..3831e515 100644 --- a/res/layout/navigation_view_customtitle_configuration.xml +++ b/res/layout/navigation_view_customtitle_configuration.xml @@ -22,9 +22,9 @@ @@ -57,7 +57,7 @@ android:id="@+id/ab_close" android:layout_width="@dimen/default_buttom_width" android:layout_height="match_parent" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:contentDescription="@null" android:onClick="onActionBarItemClick" android:src="@drawable/ic_material_light_expander_close" /> diff --git a/res/layout/navigation_view_details_item.xml b/res/layout/navigation_view_details_item.xml index 3475bccf..01a623c1 100644 --- a/res/layout/navigation_view_details_item.xml +++ b/res/layout/navigation_view_details_item.xml @@ -40,15 +40,15 @@ android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" - android:layout_marginRight="@dimen/extra_margin"> + android:layout_marginEnd="@dimen/extra_margin"> @@ -70,7 +70,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:layout_marginBottom="@dimen/default_margin" android:singleLine="true" android:textAppearance="@style/secondary_text_appearance" diff --git a/res/layout/navigation_view_icons_item.xml b/res/layout/navigation_view_icons_item.xml index 25136c1f..da31a462 100644 --- a/res/layout/navigation_view_icons_item.xml +++ b/res/layout/navigation_view_icons_item.xml @@ -24,7 +24,7 @@ android:layout_width="@dimen/navigation_grid_item_width" android:layout_height="@dimen/navigation_grid_item_height" android:layout_above="@id/navigation_view_item_name" - android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:gravity="center|center_vertical" android:src="@drawable/btn_material_light_check_off_normal" /> @@ -32,7 +32,7 @@ android:id="@+id/navigation_view_item_icon" android:layout_width="@dimen/default_row_height" android:layout_height="@dimen/default_row_height" - android:layout_toRightOf="@+id/navigation_view_item_check" + android:layout_toEndOf="@+id/navigation_view_item_check" android:scaleType="centerCrop" android:contentDescription="@null" android:gravity="center|center_vertical" @@ -43,7 +43,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/navigation_view_item_icon" - android:layout_toRightOf="@id/navigation_view_item_check" + android:layout_toEndOf="@id/navigation_view_item_check" android:ellipsize="middle" android:gravity="center|center_vertical" android:maxLines="@integer/default_grid_item_text_max_lines" diff --git a/res/layout/navigation_view_selectionbar.xml b/res/layout/navigation_view_selectionbar.xml index 3224a423..126ece26 100644 --- a/res/layout/navigation_view_selectionbar.xml +++ b/res/layout/navigation_view_selectionbar.xml @@ -31,18 +31,18 @@ android:src="@drawable/ic_material_light_accept" /> + android:layout_marginEnd="@dimen/default_margin" /> diff --git a/res/layout/navigation_view_simple_item.xml b/res/layout/navigation_view_simple_item.xml index 7dbd3e5b..f32777d8 100644 --- a/res/layout/navigation_view_simple_item.xml +++ b/res/layout/navigation_view_simple_item.xml @@ -29,8 +29,8 @@ diff --git a/res/layout/navigation_view_statusbar.xml b/res/layout/navigation_view_statusbar.xml index 4de60fe9..ae12f789 100644 --- a/res/layout/navigation_view_statusbar.xml +++ b/res/layout/navigation_view_statusbar.xml @@ -31,7 +31,7 @@ android:id="@+id/ab_overflow" android:layout_width="@dimen/default_buttom_width" android:layout_height="match_parent" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:contentDescription="@string/actionbar_button_overflow_cd" android:onClick="onActionBarItemClick" android:src="@drawable/ic_material_light_overflow" /> @@ -48,14 +48,14 @@ android:id="@+id/navigation_actionbar" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_toLeftOf="@id/ab_overflow" - android:layout_toRightOf="@id/ab_actions"> + android:layout_toStartOf="@id/ab_overflow" + android:layout_toEndOf="@id/ab_actions"> diff --git a/res/layout/picker.xml b/res/layout/picker.xml index 3e6d56c5..f9ce1b7e 100644 --- a/res/layout/picker.xml +++ b/res/layout/picker.xml @@ -27,8 +27,8 @@ android:id="@+id/breadcrumb_view" android:layout_width="match_parent" android:layout_height="@dimen/default_row_height" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin"/> + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin"/> @@ -38,8 +38,8 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" - android:layout_marginLeft="@dimen/extra_margin" - android:layout_marginRight="@dimen/extra_margin" + android:layout_marginStart="@dimen/extra_margin" + android:layout_marginEnd="@dimen/extra_margin" filemanager:navigation="pickable" /> diff --git a/res/layout/search.xml b/res/layout/search.xml index c8c6d58e..38ad0fe7 100644 --- a/res/layout/search.xml +++ b/res/layout/search.xml @@ -50,7 +50,7 @@ android:id="@+id/streaming_progress_bar" android:layout_width="@dimen/default_progress_width" android:layout_height="match_parent" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:layout_margin="@dimen/default_margin" android:indeterminate="true" android:indeterminateOnly="true" /> @@ -60,10 +60,10 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_alignParentBottom="true" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:layout_marginBottom="@dimen/default_margin" - android:layout_marginRight="@dimen/default_margin" - android:gravity="left" + android:layout_marginEnd="@dimen/default_margin" + android:gravity="start" android:textColor="@android:color/white" android:dropDownVerticalOffset="20dp" android:visibility="gone" /> @@ -72,10 +72,10 @@ android:id="@+id/search_status_found_items" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_alignParentTop="true" - android:layout_toLeftOf="@id/streaming_progress_bar" - android:layout_marginLeft="@dimen/default_margin" + android:layout_toStartOf="@id/streaming_progress_bar" + android:layout_marginStart="@dimen/default_margin" android:layout_marginTop="@dimen/default_margin" android:singleLine="true" android:textAppearance="@style/primary_text_appearance" /> @@ -85,14 +85,13 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_toLeftOf="@id/streaming_progress_bar" + android:layout_alignParentStart="true" + android:layout_toStartOf="@id/streaming_progress_bar" android:layout_marginBottom="@dimen/default_margin" - android:layout_marginLeft="@dimen/default_margin" + android:layout_marginStart="@dimen/default_margin" android:singleLine="true" android:textAppearance="@style/secondary_text_appearance" /> - + android:paddingStart="@dimen/extra_margin" + android:paddingEnd="@dimen/extra_margin"> + android:layout_alignParentEnd="true" + android:layout_toEndOf="@id/search_item_icon"> @@ -53,33 +53,33 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_marginBottom="@dimen/default_margin" - android:layout_marginLeft="@dimen/default_margin" + android:layout_marginStart="@dimen/default_margin" android:orientation="horizontal" > + android:layout_gravity="start|center_vertical" + android:layout_marginStart="@dimen/default_margin" + android:layout_marginEnd="@dimen/default_margin" /> diff --git a/res/layout/search_spinner_item.xml b/res/layout/search_spinner_item.xml index ac14b99b..503dd935 100644 --- a/res/layout/search_spinner_item.xml +++ b/res/layout/search_spinner_item.xml @@ -17,5 +17,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="left" + android:gravity="start" android:textColor="@android:color/white" /> \ No newline at end of file diff --git a/res/layout/simple_customtitle.xml b/res/layout/simple_customtitle.xml index de0ff42b..bb93800b 100644 --- a/res/layout/simple_customtitle.xml +++ b/res/layout/simple_customtitle.xml @@ -22,7 +22,7 @@ android:id="@+id/ab_button_cluster" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_alignParentRight="true"> + android:layout_alignParentEnd="true"> diff --git a/res/layout/spinner_item.xml b/res/layout/spinner_item.xml index 31b4009b..dc9feb34 100644 --- a/res/layout/spinner_item.xml +++ b/res/layout/spinner_item.xml @@ -19,6 +19,6 @@ android:id="@+id/spinner_item" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:textAppearance="@style/secondary_text_appearance" android:ellipsize="marquee" /> diff --git a/res/layout/two_columns_menu_item.xml b/res/layout/two_columns_menu_item.xml index fb48eb69..70c14bec 100644 --- a/res/layout/two_columns_menu_item.xml +++ b/res/layout/two_columns_menu_item.xml @@ -26,11 +26,11 @@ android:layout_height="match_parent" android:layout_weight="1" android:paddingBottom="@dimen/default_margin" - android:paddingLeft="@dimen/extra_large_margin" - android:paddingRight="@dimen/extra_large_margin" + android:paddingStart="@dimen/extra_large_margin" + android:paddingEnd="@dimen/extra_large_margin" android:paddingTop="@dimen/default_margin" android:clickable="true" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:singleLine="true" android:textAppearance="@style/primary_text_appearance_nohighlight" android:background="@drawable/material_selector" /> @@ -43,11 +43,11 @@ android:layout_height="match_parent" android:layout_weight="1" android:paddingBottom="@dimen/default_margin" - android:paddingLeft="@dimen/extra_large_margin" - android:paddingRight="@dimen/extra_large_margin" + android:paddingStart="@dimen/extra_large_margin" + android:paddingEnd="@dimen/extra_large_margin" android:paddingTop="@dimen/default_margin" android:clickable="true" - android:gravity="left|center_vertical" + android:gravity="start|center_vertical" android:singleLine="true" android:textAppearance="@style/primary_text_appearance_nohighlight" android:background="@drawable/material_selector" /> diff --git a/res/layout/unlock_dialog_message.xml b/res/layout/unlock_dialog_message.xml index d1391c7e..9af5bdfc 100644 --- a/res/layout/unlock_dialog_message.xml +++ b/res/layout/unlock_dialog_message.xml @@ -25,8 +25,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/double_margin" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:textAppearance="@style/primary_text_appearance" /> @@ -35,8 +35,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/double_margin" - android:layout_marginLeft="@dimen/extra_large_margin" - android:layout_marginRight="@dimen/extra_large_margin" + android:layout_marginStart="@dimen/extra_large_margin" + android:layout_marginEnd="@dimen/extra_large_margin" android:orientation="vertical"> diff --git a/res/values/dimen.xml b/res/values/dimen.xml index a06e24e0..342db6b7 100644 --- a/res/values/dimen.xml +++ b/res/values/dimen.xml @@ -128,7 +128,7 @@ 9sp - 3dp + 3dp 10dp 40dp diff --git a/res/values/styles.xml b/res/values/styles.xml index d0143f30..bad0f146 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -160,15 +160,15 @@ @@ -188,8 +188,8 @@ diff --git a/src/com/cyanogenmod/filemanager/ui/dialogs/FsoPropertiesDialog.java b/src/com/cyanogenmod/filemanager/ui/dialogs/FsoPropertiesDialog.java index 4d4b2ad2..0c3ebf82 100644 --- a/src/com/cyanogenmod/filemanager/ui/dialogs/FsoPropertiesDialog.java +++ b/src/com/cyanogenmod/filemanager/ui/dialogs/FsoPropertiesDialog.java @@ -520,10 +520,6 @@ public class FsoPropertiesDialog // Apply the them applyTabTheme(); - - // Adjust the size of the spinners - adjustSpinnerSize(this.mSpnOwner); - adjustSpinnerSize(this.mSpnGroup); } this.mInfoMsgView.setVisibility( mIsVirtual || this.mHasPrivileged || !this.mIsAdvancedMode @@ -1168,27 +1164,6 @@ public class FsoPropertiesDialog } } - /** - * Method that adjust the size of the spinner to fit the window - * - * @param spinner The spinner - */ - private void adjustSpinnerSize(final Spinner spinner) { - final View v = this.mContentView.findViewById(R.id.fso_properties_dialog_tabhost); - spinner.post(new Runnable() { - @Override - public void run() { - // Align with the last checkbox of the column - int vW = v.getMeasuredWidth(); - int[] cbSpn = new int[2]; - spinner.getLocationInWindow(cbSpn); - - // Set the width - spinner.getLayoutParams().width = vW - cbSpn[0]; - } - }); - } - /** * Method that applies the current theme to the activity */ -- cgit v1.2.3