Skip to content

Commit

Permalink
Overiding dimensions and resolving conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjupta committed Nov 18, 2020
2 parents 102321c + 5724bca commit ad66849
Show file tree
Hide file tree
Showing 30 changed files with 263 additions and 71 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/content_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
app:questionSplitViewPaddingTop="@{@dimen/space_0dp}"
app:questionViewMarginApplicable="@{!viewModel.hasConversationView && !viewModel.isSplitView}"
app:questionViewMarginBottom="@{@dimen/space_16dp}"
app:questionViewMarginEnd="@{@dimen/space_64dp}"
app:questionViewMarginStart="@{@dimen/space_64dp}"
app:questionViewMarginEnd="@{@dimen/content_item_question_view_margin_end}"
app:questionViewMarginStart="@{@dimen/content_item_question_view_margin_start}"
app:questionViewMarginTop="@{@dimen/space_32dp}"
app:questionViewPaddingApplicable="@{!viewModel.hasConversationView && !viewModel.isSplitView}"
app:questionViewPaddingBottom="@{@dimen/space_0dp}"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/drag_drop_interaction_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
app:questionSplitViewMarginTop="@{@dimen/space_40dp}"
app:questionViewMarginApplicable="@{!viewModel.hasConversationView && !viewModel.splitView}"
app:questionViewMarginBottom="@{@dimen/space_0dp}"
app:questionViewMarginEnd="@{@dimen/space_64dp}"
app:questionViewMarginStart="@{@dimen/space_64dp}"
app:questionViewMarginEnd="@{@dimen/drag_drop_item_question_view_margin_end}"
app:questionViewMarginStart="@{@dimen/drag_drop_item_question_view_margin_start}"
app:questionViewMarginTop="@{@dimen/space_24dp}">

<TextView
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/feedback_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
app:questionSplitViewPaddingTop="@{@dimen/space_0dp}"
app:questionViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:questionViewMarginBottom="@{@dimen/space_0dp}"
app:questionViewMarginEnd="@{@dimen/space_64dp}"
app:questionViewMarginStart="@{@dimen/space_64dp}"
app:questionViewMarginEnd="@{@dimen/feedback_item_question_view_margin_end}"
app:questionViewMarginStart="@{@dimen/feedback_item_question_view_margin_start}"
app:questionViewMarginTop="@{@dimen/space_24dp}"
app:questionViewPaddingApplicable="@{!viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:questionViewPaddingBottom="@{@dimen/space_0dp}"
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout-land/fraction_interaction_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
android:focusableInTouchMode="true"
android:orientation="vertical"
android:padding="0dp"
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}">

app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/fraction_interaction_item_conversation_view_margin_end : @dimen/fraction_interaction_item_non_conversation_view_margin_end}"
app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/fraction_interaction_item_conversation_view_margin_start : @dimen/fraction_interaction_item_non_conversation_view_margin_start}">
<org.oppia.android.app.customview.interaction.FractionInputInteractionView
android:id="@+id/fraction_input_interaction_view"
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
android:focusableInTouchMode="true"
android:orientation="vertical"
android:padding="0dp"
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}">
app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/numeric_input_interaction_item_conversation_view_margin_end : @dimen/numeric_input_interaction_item_non_conversation_view_margin_end}"
app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/numeric_input_interaction_item_conversation_view_margin_start : @dimen/numeric_input_interaction_item_non_conversation_view_margin_start}">

<org.oppia.android.app.customview.interaction.NumericInputInteractionView
android:id="@+id/numeric_input_interaction_view"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/selection_interaction_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
android:orientation="vertical"
android:paddingTop="12dp"
android:paddingBottom="12dp"
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:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/selection_interaction_item_conversation_view_margin_end : @dimen/selection_interaction_item_non_conversation_view_margin_end}"
app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/selection_interaction_item_conversation_view_margin_start : @dimen/selection_interaction_item_non_conversation_view_margin_start}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent">

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/state_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="top"
app:layoutMarginEnd="@{viewModel.isSplitView() ? @dimen/space_64dp : @dimen/space_120dp}"
app:layoutMarginStart="@{viewModel.isSplitView() ? @dimen/space_64dp : @dimen/space_120dp}"
app:layoutMarginEnd="@{viewModel.isSplitView() ? @dimen/state_fragment_split_view_margin_end : @dimen/space_120dp}"
app:layoutMarginStart="@{viewModel.isSplitView() ? @dimen/state_fragment_split_view_margin_start : @dimen/space_120dp}"
app:layout_constraintEnd_toStartOf="@id/center_guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/submitted_answer_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
app:questionSplitViewMarginTop="@{@dimen/space_24dp}"
app:questionViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:questionViewMarginBottom="@{@dimen/space_0dp}"
app:questionViewMarginEnd="@{@dimen/space_64dp}"
app:questionViewMarginStart="@{@dimen/space_64dp}"
app:questionViewMarginEnd="@{@dimen/submitted_answer_question_view_margin_end}"
app:questionViewMarginStart="@{@dimen/submitted_answer_question_view_margin_start}"
app:questionViewMarginTop="@{@dimen/space_24dp}">

<TextView
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-land/text_input_interaction_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
android:focusableInTouchMode="true"
android:orientation="vertical"
android:padding="0dp"
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}">
app:layoutMarginEnd="@{viewModel.hasConversationView ? @dimen/text_input_interaction_item_conversation_view_margin_end : @dimen/text_input_interaction_item_non_conversation_view_margin_end}"
app:layoutMarginStart="@{viewModel.hasConversationView ? @dimen/text_input_interaction_item_margin_start : @dimen/text_input_interaction_item_non_conversation_view_margin_start}">

<org.oppia.android.app.customview.interaction.TextInputInteractionView
android:id="@+id/text_input_interaction_view"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:layout_height="wrap_content"
app:explorationSplitViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_64dp}"
app:explorationSplitViewMarginEnd="@{@dimen/continue_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/space_0dp}"
app:explorationSplitViewMarginTop="@{@dimen/continue_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
Expand All @@ -36,7 +36,7 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_64dp}"
app:questionSplitViewMarginEnd="@{@dimen/continue_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/space_0dp}"
app:questionSplitViewMarginTop="@{@dimen/continue_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:layout_height="wrap_content"
app:explorationSplitViewMarginApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_64dp}"
app:explorationSplitViewMarginEnd="@{@dimen/continue_navigation_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/space_0dp}"
app:explorationSplitViewMarginTop="@{@dimen/continue_navigation_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand All @@ -36,7 +36,7 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_64dp}"
app:questionSplitViewMarginEnd="@{@dimen/continue_navigation_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/space_0dp}"
app:questionSplitViewMarginTop="@{@dimen/continue_navigation_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-sw600dp-land/next_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:gravity="center_vertical"
app:explorationSplitViewMarginApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_64dp}"
app:explorationSplitViewMarginEnd="@{@dimen/next_button_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/space_0dp}"
app:explorationSplitViewMarginTop="@{@dimen/next_button_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand All @@ -37,7 +37,7 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_64dp}"
app:questionSplitViewMarginEnd="@{@dimen/next_button_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/space_0dp}"
app:questionSplitViewMarginTop="@{@dimen/next_button_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_64dp}"
app:questionSplitViewMarginEnd="@{@dimen/replay_button_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/space_0dp}"
app:questionSplitViewMarginTop="@{@dimen/replay_button_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-sw600dp-land/state_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="top"
app:layoutMarginEnd="@{viewModel.isSplitView() ? @dimen/space_64dp : @dimen/space_192dp}"
app:layoutMarginStart="@{viewModel.isSplitView() ? @dimen/space_64dp : @dimen/space_192dp}"
app:layoutMarginEnd="@{viewModel.isSplitView() ? @dimen/state_fragment_split_view_margin_end : @dimen/space_192dp}"
app:layoutMarginStart="@{viewModel.isSplitView() ? @dimen/state_fragment_split_view_margin_start : @dimen/space_192dp}"
app:layout_constraintEnd_toStartOf="@id/center_guideline"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-sw600dp-land/submit_button_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
android:gravity="center_vertical"
app:explorationSplitViewMarginApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_64dp}"
app:explorationSplitViewMarginEnd="@{@dimen/submit_button_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/space_0dp}"
app:explorationSplitViewMarginTop="@{@dimen/submit_button_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand All @@ -37,7 +37,7 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_64dp}"
app:questionSplitViewMarginEnd="@{@dimen/submit_button_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/space_0dp}"
app:questionSplitViewMarginTop="@{@dimen/submit_button_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
android:layout_height="wrap_content"
app:explorationSplitViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/space_64dp : @dimen/space_24dp}"
app:explorationSplitViewMarginStart="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/space_64dp : @dimen/space_40dp}"
app:explorationSplitViewMarginEnd="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/submitted_answer_exploration_split_view_margin_end_extra_interaction_answer : @dimen/space_24dp}"
app:explorationSplitViewMarginStart="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/submitted_answer_exploration_split_view_margin_start_extra_interaction_answer : @dimen/space_40dp}"
app:explorationSplitViewMarginTop="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/space_40dp : @dimen/space_24dp}"
app:explorationSplitViewPaddingApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:explorationSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand All @@ -44,8 +44,8 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/space_64dp : @dimen/space_24dp}"
app:questionSplitViewMarginStart="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/space_64dp : @dimen/space_40dp}"
app:questionSplitViewMarginEnd="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/submitted_answer_question_split_view_margin_end_extra_interaction_answer : @dimen/space_24dp}"
app:questionSplitViewMarginStart="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/submitted_answer_question_split_view_margin_start_extra_interaction_answer : @dimen/space_40dp}"
app:questionSplitViewMarginTop="@{viewModel.isExtraInteractionAnswerCorrect() ? @dimen/space_40dp : @dimen/space_24dp}"
app:questionSplitViewPaddingApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:questionSplitViewPaddingBottom="@{@dimen/space_0dp}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:layout_height="wrap_content"
app:explorationSplitViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_64dp}"
app:explorationSplitViewMarginEnd="@{@dimen/continue_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/space_0dp}"
app:explorationSplitViewMarginTop="@{@dimen/continue_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
Expand All @@ -36,7 +36,7 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_64dp}"
app:questionSplitViewMarginEnd="@{@dimen/continue_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/space_0dp}"
app:questionSplitViewMarginTop="@{@dimen/continue_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
android:layout_height="wrap_content"
app:explorationSplitViewMarginApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
app:explorationSplitViewMarginEnd="@{@dimen/space_64dp}"
app:explorationSplitViewMarginEnd="@{@dimen/continue_navigation_item_exploration_split_view_margin_end}"
app:explorationSplitViewMarginStart="@{@dimen/space_0dp}"
app:explorationSplitViewMarginTop="@{@dimen/continue_navigation_item_exploration_split_view_margin_top}"
app:explorationSplitViewPaddingApplicable="@{buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand All @@ -36,7 +36,7 @@
app:explorationViewPaddingTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
app:questionSplitViewMarginEnd="@{@dimen/space_64dp}"
app:questionSplitViewMarginEnd="@{@dimen/continue_navigation_item_question_split_view_margin_end}"
app:questionSplitViewMarginStart="@{@dimen/space_0dp}"
app:questionSplitViewMarginTop="@{@dimen/continue_navigation_item_question_split_view_margin_top}"
app:questionSplitViewPaddingApplicable="@{!buttonViewModel.hasConversationView &amp;&amp; buttonViewModel.isSplitView}"
Expand Down
Loading

0 comments on commit ad66849

Please sign in to comment.