Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix part of #2003: Replacing space_48dp, space_36dp #2115

Merged
merged 2 commits into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/content_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/feedback_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}">

<org.oppia.android.app.customview.interaction.FractionInputInteractionView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/numeric_input_interaction_item_conversation_view_margin_end : @dimen/space_64dp}"
app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/numeric_input_interaction_item_conversation_view_margin_start : @dimen/space_64dp}">

<org.oppia.android.app.customview.interaction.NumericInputInteractionView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:orientation="vertical"
android:paddingTop="12dp"
android:paddingBottom="12dp"
app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/space_48dp : @dimen/space_64dp}"
app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/selection_interaction_item_conversation_view_margin_end : @dimen/space_64dp}"
app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/selection_interaction_item_conversation_view_margin_start : @dimen/space_64dp}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/submitted_answer_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
app:explorationSplitViewMarginTop="@{@dimen/space_24dp}"
app:explorationViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; !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 &amp;&amp; viewModel.isSplitView}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}">

<org.oppia.android.app.customview.interaction.TextInputInteractionView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
app:explorationSplitViewMarginApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_0dp}"
app:explorationSplitViewMarginStart="@{@dimen/space_48dp}"
app:explorationSplitViewMarginStart="@{@dimen/previous_button_item_exploration_split_view_margin_start}"
app:explorationSplitViewMarginTop="@{@dimen/previous_button_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand All @@ -38,7 +38,7 @@
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_0dp}"
app:questionSplitViewMarginStart="@{@dimen/space_48dp}"
app:questionSplitViewMarginStart="@{@dimen/previous_button_item_question_split_view_margin_start}"
app:questionSplitViewMarginTop="@{@dimen/previous_button_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
android:layout_width="108dp"
android:layout_height="108dp"
android:src="@drawable/ic_add_profile"
app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/space_48dp : @dimen/space_0dp}"
app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_add_view_circular_image_margin_top_profile_already_added : @dimen/space_0dp}"
app:civ_border_color="@color/avatarBorder"
app:civ_border_width="1dp" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}" />

<TextView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-sw600dp-land/state_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:overScrollMode="never"
android:paddingTop="@{viewModel.isAudioBarVisible ? @dimen/space_48dp : @dimen/space_0dp}"
android:paddingTop="@{viewModel.isAudioBarVisible ? @dimen/state_fragment_padding_top_audio_bar_visible : @dimen/space_0dp}"
android:paddingBottom="112dp"
android:scrollbars="none"
app:data="@{viewModel.itemList}"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-sw600dp-port/content_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
app:explorationViewMarginBottom="@{@dimen/space_0dp}"
app:explorationViewMarginEnd="@{@dimen/space_144dp}"
app:explorationViewMarginStart="@{@dimen/space_112dp}"
app:explorationViewMarginTop="@{@dimen/space_36dp}"
app:explorationViewMarginTop="@{@dimen/content_item_exploration_view_margin_top}"
app:explorationViewPaddingApplicable="@{viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:explorationViewPaddingBottom="@{@dimen/space_16dp}"
app:explorationViewPaddingEnd="@{@dimen/space_12dp}"
Expand All @@ -52,7 +52,7 @@
app:questionViewMarginBottom="@{@dimen/space_0dp}"
app:questionViewMarginEnd="@{@dimen/space_128dp}"
app:questionViewMarginStart="@{@dimen/space_128dp}"
app:questionViewMarginTop="@{@dimen/space_36dp}"
app:questionViewMarginTop="@{@dimen/content_item_question_view_margin_top}"
app:questionViewPaddingApplicable="@{!viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:questionViewPaddingBottom="@{@dimen/space_0dp}"
app:questionViewPaddingEnd="@{@dimen/space_0dp}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
app:explorationSplitViewMarginApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_0dp}"
app:explorationSplitViewMarginStart="@{@dimen/space_48dp}"
app:explorationSplitViewMarginStart="@{@dimen/previous_button_item_exploration_split_view_margin_start}"
app:explorationSplitViewMarginTop="@{@dimen/previous_button_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand All @@ -38,7 +38,7 @@
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_0dp}"
app:questionSplitViewMarginStart="@{@dimen/space_48dp}"
app:questionSplitViewMarginStart="@{@dimen/previous_button_item_question_split_view_margin_start}"
app:questionSplitViewMarginTop="@{@dimen/previous_button_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:onClick="@{(v) -> viewModel.onResponsesHeaderClicked()}"
app:explorationSplitViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_48dp}"
app:explorationSplitViewMarginEnd="@{@dimen/previous_responses_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/previous_responses_item_exploration_split_view_margin_start}"
app:explorationSplitViewMarginTop="@{@dimen/space_24dp}"
app:explorationViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
Expand All @@ -28,7 +28,7 @@
app:explorationViewMarginTop="@{@dimen/space_24dp}"
app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_48dp}"
app:questionSplitViewMarginEnd="@{@dimen/previous_responses_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/previous_responses_item_question_split_view_margin_start}"
app:questionSplitViewMarginTop="@{@dimen/space_24dp}"
app:questionViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
android:layout_width="108dp"
android:layout_height="108dp"
android:src="@drawable/ic_add_profile"
app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/space_48dp : @dimen/space_0dp}"
app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_add_view_circular_image_margin_top_profile_already_added : @dimen/space_0dp}"
app:civ_border_color="@color/avatarBorder"
app:civ_border_width="1dp" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}" />

<TextView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-sw600dp-port/state_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:overScrollMode="never"
android:paddingTop="@{viewModel.isAudioBarVisible ? @dimen/space_48dp : @dimen/space_0dp}"
android:paddingTop="@{viewModel.isAudioBarVisible ? @dimen/state_fragment_padding_top_audio_bar_visible : @dimen/space_0dp}"
android:paddingBottom="112dp"
android:scrollbars="none"
app:data="@{viewModel.itemList}"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/content_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
app:questionViewMarginBottom="@{@dimen/space_12dp}"
app:questionViewMarginEnd="@{@dimen/space_32dp}"
app:questionViewMarginStart="@{@dimen/space_32dp}"
app:questionViewMarginTop="@{@dimen/space_36dp}"
app:questionViewMarginTop="@{@dimen/content_item_question_view_margin_top}"
app:questionViewPaddingApplicable="@{!viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:questionViewPaddingBottom="@{@dimen/space_0dp}"
app:questionViewPaddingEnd="@{@dimen/space_0dp}"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/previous_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
app:explorationSplitViewMarginApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_0dp}"
app:explorationSplitViewMarginStart="@{@dimen/space_48dp}"
app:explorationSplitViewMarginStart="@{@dimen/previous_button_item_exploration_split_view_margin_start}"
app:explorationSplitViewMarginTop="@{@dimen/previous_button_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand All @@ -38,7 +38,7 @@
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_0dp}"
app:questionSplitViewMarginStart="@{@dimen/space_48dp}"
app:questionSplitViewMarginStart="@{@dimen/previous_button_item_question_split_view_margin_start}"
app:questionSplitViewMarginTop="@{@dimen/previous_button_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
<dimen name="home_margin_min">36dp</dimen>
<dimen name="recently_played_margin_max">72dp</dimen>
<dimen name="recently_played_margin_min">36dp</dimen>

<dimen name="content_item_exploration_view_margin_start">48dp</dimen>
</resources>
3 changes: 3 additions & 0 deletions app/src/main/res/values-sw600dp-port/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
<dimen name="home_margin_min">60dp</dimen>
<dimen name="recently_played_margin_max">120dp</dimen>
<dimen name="recently_played_margin_min">60dp</dimen>

<dimen name="previous_responses_item_question_split_view_margin_end">48dp</dimen>
<dimen name="previous_responses_item_exploration_split_view_margin_end">48dp</dimen>
</resources>
19 changes: 17 additions & 2 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<dimen name="space_224dp">224dp</dimen>
<dimen name="space_128dp">128dp</dimen>
<dimen name="space_64dp">64dp</dimen>
<dimen name="space_48dp">48dp</dimen>
<dimen name="space_36dp">36dp</dimen>
<dimen name="space_32dp">32dp</dimen>
<dimen name="space_24dp">24dp</dimen>
<dimen name="space_16dp">16dp</dimen>
Expand Down Expand Up @@ -134,4 +132,21 @@
<dimen name="selection_interaction_item_conversation_view_margin_start">80dp</dimen>
<dimen name="submitted_answer_item_exploration_view_margin_start">80dp</dimen>
<dimen name="text_input_interaction_item_margin_start">80dp</dimen>

<dimen name="content_item_question_view_margin_top">36dp</dimen>
<dimen name="content_item_exploration_view_margin_top">36dp</dimen>
<dimen name="previous_button_item_question_split_view_margin_start">48dp</dimen>
<dimen name="previous_button_item_exploration_split_view_margin_start">48dp</dimen>
<dimen name="previous_button_item_question_view_margin_start">48dp</dimen>
<dimen name="previous_button_item_exploration_view_margin_start">48dp</dimen>
<dimen name="drag_drop_item_exploration_view_margin_end">48dp</dimen>
<dimen name="feedback_item_exploration_view_margin_start">48dp</dimen>
<dimen name="fraction_interaction_item_conversation_view_margin_end">48dp</dimen>
<dimen name="numeric_input_interaction_item_conversation_view_margin_end">48dp</dimen>
<dimen name="selection_interaction_item_conversation_view_margin_end">48dp</dimen>
<dimen name="submitted_answer_item_exploration_view_margin_end">48dp</dimen>
<dimen name="text_input_interaction_item_conversation_view_margin_end">48dp</dimen>
<dimen name="profile_chooser_add_view_circular_image_margin_top_profile_already_added">48dp</dimen>
<dimen name="profile_chooser_profile_view_circular_image_margin_top_profile_already_added">48dp</dimen>
<dimen name="state_fragment_padding_top_audio_bar_visible">48dp</dimen>
</resources>