From 7f3f4d1e0890608184672814d8786b2c3465b793 Mon Sep 17 00:00:00 2001 From: ARJUPTA <64064110+ARJUPTA@users.noreply.github.com> Date: Mon, 16 Nov 2020 01:31:57 +0530 Subject: [PATCH] Fix part of #2003: Replacing space_48dp,space_36dp Fixes part of #2003 This PR replaces the use of space_48dp and space_36dp with the dimensions having contextful names. --- app/src/main/res/layout-land/content_item.xml | 2 +- .../drag_drop_interaction_item.xml | 2 +- .../main/res/layout-land/feedback_item.xml | 2 +- .../layout-land/fraction_interaction_item.xml | 2 +- .../numeric_input_interaction_item.xml | 2 +- .../selection_interaction_item.xml | 2 +- .../res/layout-land/submitted_answer_item.xml | 2 +- .../text_input_interaction_item.xml | 2 +- .../previous_button_item.xml | 4 ++-- .../profile_chooser_add_view.xml | 2 +- .../profile_chooser_profile_view.xml | 2 +- .../layout-sw600dp-land/state_fragment.xml | 2 +- .../res/layout-sw600dp-port/content_item.xml | 4 ++-- .../previous_button_item.xml | 4 ++-- .../previous_responses_header_item.xml | 4 ++-- .../profile_chooser_add_view.xml | 2 +- .../profile_chooser_profile_view.xml | 2 +- .../layout-sw600dp-port/state_fragment.xml | 2 +- app/src/main/res/layout/content_item.xml | 2 +- .../main/res/layout/previous_button_item.xml | 4 ++-- app/src/main/res/values-land/dimens.xml | 2 ++ .../main/res/values-sw600dp-port/dimens.xml | 3 +++ app/src/main/res/values/dimens.xml | 19 +++++++++++++++++-- 23 files changed, 47 insertions(+), 27 deletions(-) diff --git a/app/src/main/res/layout-land/content_item.xml b/app/src/main/res/layout-land/content_item.xml index 9a66eff57c3..e5046bd2ad3 100644 --- a/app/src/main/res/layout-land/content_item.xml +++ b/app/src/main/res/layout-land/content_item.xml @@ -31,7 +31,7 @@ app:explorationViewMarginApplicable="@{viewModel.hasConversationView && !viewModel.isSplitView}" app:explorationViewMarginBottom="@{@dimen/space_0dp}" app:explorationViewMarginEnd="@{@dimen/content_item_exploration_view_margin_end}" - app:explorationViewMarginStart="@{@dimen/space_48dp}" + app:explorationViewMarginStart="@{@dimen/content_item_exploration_view_margin_start}" app:explorationViewMarginTop="@{@dimen/space_16dp}" app:explorationViewPaddingApplicable="@{viewModel.hasConversationView && !viewModel.isSplitView}" app:explorationViewPaddingBottom="@{@dimen/space_16dp}" diff --git a/app/src/main/res/layout-land/drag_drop_interaction_item.xml b/app/src/main/res/layout-land/drag_drop_interaction_item.xml index 6864adeb42d..96c428814e4 100644 --- a/app/src/main/res/layout-land/drag_drop_interaction_item.xml +++ b/app/src/main/res/layout-land/drag_drop_interaction_item.xml @@ -31,7 +31,7 @@ app:explorationSplitViewMarginTop="@{@dimen/space_40dp}" app:explorationViewMarginApplicable="@{viewModel.hasConversationView && !viewModel.splitView}" app:explorationViewMarginBottom="@{@dimen/space_0dp}" - app:explorationViewMarginEnd="@{@dimen/space_48dp}" + app:explorationViewMarginEnd="@{@dimen/drag_drop_item_exploration_view_margin_end}" app:explorationViewMarginStart="@{@dimen/content_item_exploration_view_margin_start}" app:explorationViewMarginTop="@{@dimen/space_24dp}" app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView && viewModel.splitView}" diff --git a/app/src/main/res/layout-land/feedback_item.xml b/app/src/main/res/layout-land/feedback_item.xml index 911d283a783..c22b81d575a 100644 --- a/app/src/main/res/layout-land/feedback_item.xml +++ b/app/src/main/res/layout-land/feedback_item.xml @@ -31,7 +31,7 @@ app:explorationViewMarginApplicable="@{viewModel.hasConversationView && !viewModel.isSplitView}" app:explorationViewMarginBottom="@{@dimen/space_0dp}" app:explorationViewMarginEnd="@{@dimen/feedback_item_exploration_view_margin_end}" - app:explorationViewMarginStart="@{@dimen/space_48dp}" + app:explorationViewMarginStart="@{@dimen/feedback_item_exploration_view_margin_start}" app:explorationViewMarginTop="@{@dimen/space_24dp}" app:explorationViewPaddingApplicable="@{viewModel.hasConversationView && !viewModel.isSplitView}" app:explorationViewPaddingBottom="@{@dimen/space_16dp}" diff --git a/app/src/main/res/layout-land/fraction_interaction_item.xml b/app/src/main/res/layout-land/fraction_interaction_item.xml index b57a732f210..a9d05ae20af 100644 --- a/app/src/main/res/layout-land/fraction_interaction_item.xml +++ b/app/src/main/res/layout-land/fraction_interaction_item.xml @@ -20,7 +20,7 @@ android:focusableInTouchMode="true" android:orientation="vertical" android:padding="0dp" - app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/space_48dp : @dimen/space_64dp}" + app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/fraction_interaction_item_conversation_view_margin_end : @dimen/space_64dp}" app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/fraction_interaction_item_conversation_view_margin_start : @dimen/space_64dp}"> diff --git a/app/src/main/res/layout-land/submitted_answer_item.xml b/app/src/main/res/layout-land/submitted_answer_item.xml index e6ec382ed7a..950970d018c 100644 --- a/app/src/main/res/layout-land/submitted_answer_item.xml +++ b/app/src/main/res/layout-land/submitted_answer_item.xml @@ -33,7 +33,7 @@ app:explorationSplitViewMarginTop="@{@dimen/space_24dp}" app:explorationViewMarginApplicable="@{viewModel.hasConversationView && !viewModel.isSplitView}" app:explorationViewMarginBottom="@{@dimen/space_0dp}" - app:explorationViewMarginEnd="@{@dimen/space_48dp}" + app:explorationViewMarginEnd="@{@dimen/submitted_answer_item_exploration_view_margin_end}" app:explorationViewMarginStart="@{@dimen/submitted_answer_item_exploration_view_margin_start}" app:explorationViewMarginTop="@{@dimen/space_24dp}" app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView && viewModel.isSplitView}" diff --git a/app/src/main/res/layout-land/text_input_interaction_item.xml b/app/src/main/res/layout-land/text_input_interaction_item.xml index 5faf279abc7..be96daa5190 100644 --- a/app/src/main/res/layout-land/text_input_interaction_item.xml +++ b/app/src/main/res/layout-land/text_input_interaction_item.xml @@ -18,7 +18,7 @@ android:focusableInTouchMode="true" android:orientation="vertical" android:padding="0dp" - app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/space_48dp : @dimen/space_64dp}" + app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/text_input_interaction_item_conversation_view_margin_end : @dimen/space_64dp}" app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/text_input_interaction_item_margin_start : @dimen/space_64dp}"> diff --git a/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml b/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml index ff3f0325e84..e5cb6d74bf6 100644 --- a/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml +++ b/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml @@ -48,7 +48,7 @@ android:layout_height="108dp" app:civ_border_color="@color/avatarBorder" app:civ_border_width="1dp" - app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/space_48dp : @dimen/space_0dp}" + app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_profile_view_circular_image_margin_top_profile_already_added : @dimen/space_0dp}" profile:src="@{viewModel.profile.avatar}" /> diff --git a/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml b/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml index 188ad4a9c0d..029d2a1510a 100644 --- a/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml +++ b/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml @@ -49,7 +49,7 @@ android:layout_height="108dp" app:civ_border_color="@color/avatarBorder" app:civ_border_width="1dp" - app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/space_48dp : @dimen/space_0dp}" + app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_profile_view_circular_image_margin_top_profile_already_added : @dimen/space_0dp}" profile:src="@{viewModel.profile.avatar}" /> 36dp 72dp 36dp + + 48dp diff --git a/app/src/main/res/values-sw600dp-port/dimens.xml b/app/src/main/res/values-sw600dp-port/dimens.xml index c1104c78528..c464910b32d 100644 --- a/app/src/main/res/values-sw600dp-port/dimens.xml +++ b/app/src/main/res/values-sw600dp-port/dimens.xml @@ -6,4 +6,7 @@ 60dp 120dp 60dp + + 48dp + 48dp diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e3c1f4f52fa..ef3a0334090 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -19,8 +19,6 @@ 128dp 72dp 64dp - 48dp - 36dp 32dp 24dp 16dp @@ -106,4 +104,21 @@ 80dp 80dp 80dp + + 36dp + 36dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp + 48dp