From f7669b67972acbf61a6c9e589a2bd5c50e72b0cd Mon Sep 17 00:00:00 2001 From: arkon Date: Thu, 9 Jan 2020 19:10:55 -0500 Subject: [PATCH] Replace left/right layout attributes with start/end --- .../catalogue/SourceDividerItemDecoration.kt | 4 +- .../ExtensionDividerItemDecoration.kt | 4 +- .../res/layout-land/manga_info_controller.xml | 92 +++++++------- .../layout-land/reader_color_filter_sheet.xml | 8 +- .../res/layout/catalogue_drawer_content.xml | 12 +- .../catalogue_global_search_controller.xml | 23 ++-- ...atalogue_global_search_controller_card.xml | 4 +- .../main/res/layout/catalogue_grid_item.xml | 24 ++-- .../main/res/layout/catalogue_list_item.xml | 115 +++++++++--------- .../layout/catalogue_main_controller_card.xml | 4 +- .../catalogue_main_controller_card_item.xml | 12 +- app/src/main/res/layout/categories_item.xml | 6 +- .../res/layout/changelog_header_layout.xml | 11 +- .../main/res/layout/changelog_row_layout.xml | 17 +-- .../main/res/layout/chapters_controller.xml | 4 +- app/src/main/res/layout/chapters_item.xml | 29 ++--- .../layout/common_dialog_with_checkbox.xml | 3 - app/src/main/res/layout/download_item.xml | 12 +- .../main/res/layout/extension_card_header.xml | 4 +- .../main/res/layout/extension_card_item.xml | 9 +- .../layout/extension_detail_controller.xml | 30 ++--- .../main/res/layout/manga_info_controller.xml | 102 ++++++++-------- app/src/main/res/layout/navigation_header.xml | 2 +- .../res/layout/navigation_view_checkbox.xml | 6 +- .../layout/navigation_view_checkedtext.xml | 4 +- .../main/res/layout/navigation_view_group.xml | 6 +- .../main/res/layout/navigation_view_radio.xml | 6 +- .../res/layout/navigation_view_spinner.xml | 4 +- .../main/res/layout/navigation_view_text.xml | 4 +- app/src/main/res/layout/pref_item_source.xml | 15 ++- .../main/res/layout/pref_library_columns.xml | 6 +- .../main/res/layout/reader_color_filter.xml | 78 ++++++------ app/src/main/res/layout/reader_page_sheet.xml | 9 -- .../main/res/layout/reader_settings_sheet.xml | 52 ++++---- .../main/res/layout/recent_chapters_item.xml | 23 ++-- .../layout/recent_chapters_section_item.xml | 3 - .../main/res/layout/recently_read_item.xml | 4 +- app/src/main/res/layout/track_item.xml | 40 +++--- app/src/main/res/layout/track_search_item.xml | 17 +-- 39 files changed, 366 insertions(+), 442 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/SourceDividerItemDecoration.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/SourceDividerItemDecoration.kt index 1b33496160..6d4fb6fbe3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/SourceDividerItemDecoration.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/catalogue/SourceDividerItemDecoration.kt @@ -27,8 +27,8 @@ class SourceDividerItemDecoration(context: Context) : RecyclerView.ItemDecoratio val params = child.layoutParams as RecyclerView.LayoutParams val top = child.bottom + params.bottomMargin val bottom = top + divider.intrinsicHeight - val left = parent.paddingLeft + holder.margin - val right = parent.width - parent.paddingRight - holder.margin + val left = parent.paddingStart + holder.margin + val right = parent.width - parent.paddingEnd - holder.margin divider.setBounds(left, top, right, bottom) divider.draw(c) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDividerItemDecoration.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDividerItemDecoration.kt index 24c7c0a432..e70bccccac 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDividerItemDecoration.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/extension/ExtensionDividerItemDecoration.kt @@ -27,8 +27,8 @@ class ExtensionDividerItemDecoration(context: Context) : RecyclerView.ItemDecora val params = child.layoutParams as RecyclerView.LayoutParams val top = child.bottom + params.bottomMargin val bottom = top + divider.intrinsicHeight - val left = parent.paddingLeft + holder.margin - val right = parent.width - parent.paddingRight - holder.margin + val left = parent.paddingStart + holder.margin + val right = parent.width - parent.paddingEnd - holder.margin divider.setBounds(left, top, right, bottom) divider.draw(c) diff --git a/app/src/main/res/layout-land/manga_info_controller.xml b/app/src/main/res/layout-land/manga_info_controller.xml index 2eed51af8a..130fd4afed 100644 --- a/app/src/main/res/layout-land/manga_info_controller.xml +++ b/app/src/main/res/layout-land/manga_info_controller.xml @@ -21,24 +21,23 @@ android:layout_height="0dp" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" - android:layout_marginLeft="16dp" + android:layout_marginStart="16dp" android:contentDescription="@string/description_cover" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintDimensionRatio="h,3:2" tools:background="@color/material_grey_700" - app:layout_constraintVertical_bias="0.0" - android:layout_marginStart="16dp"/> + app:layout_constraintVertical_bias="0.0" /> + app:layout_constraintEnd_toEndOf="parent"/> + app:layout_constraintStart_toEndOf="@+id/manga_cover" + app:layout_constraintEnd_toEndOf="parent"> + app:layout_constraintStart_toStartOf="parent"/> + app:layout_constraintStart_toEndOf="@+id/manga_author_label" + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintStart_toStartOf="parent"/> + app:layout_constraintStart_toEndOf="@+id/manga_artist_label" + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintStart_toStartOf="parent"/> + app:layout_constraintStart_toEndOf="@+id/manga_chapters_label" + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintStart_toStartOf="parent"/> + app:layout_constraintStart_toEndOf="@+id/manga_last_update_label" + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintStart_toStartOf="parent"/> + app:layout_constraintStart_toEndOf="@+id/manga_status_label" + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintStart_toStartOf="parent"/> + app:layout_constraintStart_toEndOf="@+id/manga_source_label" + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintStart_toStartOf="parent"/> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toEndOf="parent" + android:layout_marginEnd="64dp"/> - + android:layout_marginEnd="64dp"/> diff --git a/app/src/main/res/layout-land/reader_color_filter_sheet.xml b/app/src/main/res/layout-land/reader_color_filter_sheet.xml index 9cf10846dd..75c1f8424c 100644 --- a/app/src/main/res/layout-land/reader_color_filter_sheet.xml +++ b/app/src/main/res/layout-land/reader_color_filter_sheet.xml @@ -12,8 +12,8 @@ android:id="@+id/frame" android:layout_width="0dp" android:layout_height="0dp" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toLeftOf="@id/scroll" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintEnd_toStartOf="@id/scroll" app:layout_constraintTop_toTopOf="@id/scroll" app:layout_constraintBottom_toBottomOf="@id/scroll"> @@ -40,8 +40,8 @@ android:id="@+id/scroll" android:layout_width="0dp" android:layout_height="wrap_content" - app:layout_constraintLeft_toRightOf="@id/frame" - app:layout_constraintRight_toRightOf="parent"> + app:layout_constraintStart_toEndOf="@id/frame" + app:layout_constraintEnd_toEndOf="parent"> diff --git a/app/src/main/res/layout/catalogue_drawer_content.xml b/app/src/main/res/layout/catalogue_drawer_content.xml index b2b621a9cf..b4bf2e16bc 100644 --- a/app/src/main/res/layout/catalogue_drawer_content.xml +++ b/app/src/main/res/layout/catalogue_drawer_content.xml @@ -6,6 +6,7 @@ android:layout_height="match_parent" android:clickable="true" android:orientation="vertical"> + + android:paddingStart="?attr/listPreferredItemPaddingStart" + android:paddingEnd="?attr/listPreferredItemPaddingEnd"> + + + - \ No newline at end of file + + diff --git a/app/src/main/res/layout/catalogue_global_search_controller.xml b/app/src/main/res/layout/catalogue_global_search_controller.xml index 4f9ab29f8e..7959047a90 100644 --- a/app/src/main/res/layout/catalogue_global_search_controller.xml +++ b/app/src/main/res/layout/catalogue_global_search_controller.xml @@ -1,15 +1,16 @@ - - + android:layout_height="wrap_content"> + + + diff --git a/app/src/main/res/layout/catalogue_global_search_controller_card.xml b/app/src/main/res/layout/catalogue_global_search_controller_card.xml index 60c6ce4968..3b38de0f10 100644 --- a/app/src/main/res/layout/catalogue_global_search_controller_card.xml +++ b/app/src/main/res/layout/catalogue_global_search_controller_card.xml @@ -14,7 +14,7 @@ android:padding="@dimen/material_component_text_fields_padding_above_and_below_label" app:layout_constraintBottom_toTopOf="@+id/source_card" app:layout_constraintHeight_default="wrap" - app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" tools:text="Title" /> @@ -45,5 +45,7 @@ android:paddingStart="4dp" android:clipToPadding="false" tools:listitem="@layout/catalogue_global_search_controller_card_item" /> + + diff --git a/app/src/main/res/layout/catalogue_grid_item.xml b/app/src/main/res/layout/catalogue_grid_item.xml index 614a0bbd19..5b833d32ff 100644 --- a/app/src/main/res/layout/catalogue_grid_item.xml +++ b/app/src/main/res/layout/catalogue_grid_item.xml @@ -41,14 +41,14 @@ android:layout_height="wrap_content" android:background="@color/colorAccentDark" android:paddingBottom="1dp" - android:paddingLeft="3dp" - android:paddingRight="3dp" + android:paddingStart="3dp" + android:paddingEnd="3dp" android:paddingTop="1dp" android:visibility="gone" tools:visibility="visible" tools:text="120" - app:layout_constraintLeft_toRightOf="@+id/download_text" - android:layout_marginLeft="4dp" + app:layout_constraintStart_toEndOf="@+id/download_text" + android:layout_marginStart="4dp" app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="4dp"/> diff --git a/app/src/main/res/layout/catalogue_list_item.xml b/app/src/main/res/layout/catalogue_list_item.xml index b83795268a..09b4e9943b 100644 --- a/app/src/main/res/layout/catalogue_list_item.xml +++ b/app/src/main/res/layout/catalogue_list_item.xml @@ -5,22 +5,23 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="@dimen/material_component_lists_single_line_with_avatar_height" - android:layout_gravity="center_vertical" + android:layout_gravity="center_vertical" android:background="?attr/selectable_list_drawable" tools:layout_editor_absoluteY="25dp" tools:layout_editor_absoluteX="0dp"> + + android:layout_marginStart="8dp"/> @@ -49,8 +49,8 @@ android:layout_height="wrap_content" android:background="@color/md_teal_500" android:paddingBottom="1dp" - android:paddingLeft="3dp" - android:paddingRight="3dp" + android:paddingStart="3dp" + android:paddingEnd="3dp" android:paddingTop="1dp" android:layout_centerVertical="true" android:maxLines="1" @@ -58,58 +58,57 @@ android:visibility="gone" tools:visibility="visible" android:layout_marginEnd="8dp" - app:layout_constraintRight_toLeftOf="@+id/unread_text" + app:layout_constraintEnd_toStartOf="@+id/unread_text" app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="8dp" app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="8dp"/> - + - - - + + diff --git a/app/src/main/res/layout/catalogue_main_controller_card.xml b/app/src/main/res/layout/catalogue_main_controller_card.xml index aec409b0a0..e0ba18d4ab 100644 --- a/app/src/main/res/layout/catalogue_main_controller_card.xml +++ b/app/src/main/res/layout/catalogue_main_controller_card.xml @@ -12,7 +12,7 @@ android:layout_height="wrap_content" android:paddingTop="8dp" android:paddingBottom="8dp" - android:paddingLeft="@dimen/material_component_text_fields_padding_above_and_below_label" + android:paddingStart="@dimen/material_component_text_fields_padding_above_and_below_label" tools:text="Title" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/catalogue_main_controller_card_item.xml b/app/src/main/res/layout/catalogue_main_controller_card_item.xml index 071c89ad77..faf7915d00 100644 --- a/app/src/main/res/layout/catalogue_main_controller_card_item.xml +++ b/app/src/main/res/layout/catalogue_main_controller_card_item.xml @@ -19,7 +19,7 @@ android:padding="8dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintDimensionRatio="1:1" - app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" tools:src="@mipmap/ic_launcher_round" /> @@ -28,16 +28,14 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:maxLines="1" - android:paddingLeft="0dp" android:paddingStart="0dp" - android:paddingRight="8dp" android:paddingEnd="8dp" android:ellipsize="end" android:textAppearance="@style/TextAppearance.Regular.SubHeading" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintLeft_toRightOf="@+id/image" + app:layout_constraintStart_toEndOf="@+id/image" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintRight_toLeftOf="@+id/source_latest" + app:layout_constraintEnd_toStartOf="@+id/source_latest" tools:text="Source title"/>