Skip to content

Commit

Permalink
Fixes part of #40 & #42: Previous Responses highfi + A11y (#3186)
Browse files Browse the repository at this point in the history
* All dimens created

* Added 12dp to start/end of margins

* Nit fixes

* Nit change

* Removed margin top dimens

Co-authored-by: Rajat Talesra <[email protected]>
  • Loading branch information
rt4914 and Rajat Talesra authored May 13, 2021
1 parent 20b0c2e commit 7a2cede
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 271 deletions.
76 changes: 0 additions & 76 deletions app/src/main/res/layout-land/previous_responses_header_item.xml

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 7 additions & 5 deletions app/src/main/res/layout/previous_responses_header_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,29 @@
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:minHeight="@dimen/clickable_item_min_height"
android:onClick="@{(v) -> viewModel.onResponsesHeaderClicked()}"
android:padding="0dp"
android:paddingTop="24dp"
app:explorationSplitViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:explorationSplitViewMarginBottom="@{@dimen/space_0dp}"
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/previous_responses_item_exploration_split_view_margin_top}"
app:explorationSplitViewMarginTop="@{@dimen/space_0dp}"
app:explorationViewMarginApplicable="@{viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:explorationViewMarginBottom="@{@dimen/space_0dp}"
app:explorationViewMarginEnd="@{@dimen/previous_responses_item_exploration_view_margin_end}"
app:explorationViewMarginStart="@{@dimen/previous_responses_item_exploration_view_margin_start}"
app:explorationViewMarginTop="@{@dimen/previous_responses_item_exploration_view_margin_top}"
app:explorationViewMarginTop="@{@dimen/space_0dp}"
app:questionSplitViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; viewModel.isSplitView}"
app:questionSplitViewMarginBottom="@{@dimen/space_0dp}"
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/previous_responses_item_question_split_view_margin_top}"
app:questionSplitViewMarginTop="@{@dimen/space_0dp}"
app:questionViewMarginApplicable="@{!viewModel.hasConversationView &amp;&amp; !viewModel.isSplitView}"
app:questionViewMarginBottom="@{@dimen/space_0dp}"
app:questionViewMarginEnd="@{@dimen/previous_responses_item_question_view_margin_end}"
app:questionViewMarginStart="@{@dimen/previous_responses_item_question_view_margin_start}"
app:questionViewMarginTop="@{@dimen/previous_responses_item_question_view_margin_top}">
app:questionViewMarginTop="@{@dimen/space_0dp}">

<FrameLayout
android:layout_width="0dp"
Expand All @@ -53,6 +54,7 @@
android:layout_height="wrap_content"
android:drawableEnd="@{viewModel.isExpanded ? @drawable/ic_arrow_down_grey_24dp : @drawable/ic_arrow_right_grey_24dp}"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="@{@string/previous_responses_header(viewModel.previousAnswerCount)}"
Expand Down
24 changes: 16 additions & 8 deletions app/src/main/res/values-land/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
<dimen name="text_input_interaction_item_conversation_view_margin_end">48dp</dimen>
<dimen name="drag_drop_item_exploration_view_margin_top">24dp</dimen>
<dimen name="drag_drop_item_question_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_exploration_split_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_question_split_view_margin_top">24dp</dimen>
<dimen name="previous_responses_item_question_view_margin_top">24dp</dimen>
<dimen name="profile_chooser_add_view_margin_top_profile_not_added">24dp</dimen>
<dimen name="profile_chooser_profile_view_margin_top_profile_not_added">24dp</dimen>

Expand All @@ -57,10 +53,6 @@
<dimen name="state_fragment_non_split_view_margin_end">120dp</dimen>
<dimen name="state_fragment_non_split_view_margin_start">120dp</dimen>
<dimen name="numeric_input_interaction_item_conversation_view_margin_start">80dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_end">80dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_start">80dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">80dp</dimen>
<dimen name="previous_responses_item_question_view_margin_start">80dp</dimen>
<dimen name="selection_interaction_item_conversation_view_margin_start">80dp</dimen>
<dimen name="drag_drop_item_exploration_split_view_margin_top">40dp</dimen>
<dimen name="drag_drop_item_question_split_view_margin_top">40dp</dimen>
Expand Down Expand Up @@ -141,4 +133,20 @@
<!-- Selection Interaction Item -->
<dimen name="selection_interaction_item_padding_start">16dp</dimen>
<dimen name="selection_interaction_item_padding_end">16dp</dimen>

<!-- Previous Responses Item: Exploration Split View -->
<dimen name="previous_responses_item_exploration_split_view_margin_start">36dp</dimen>
<dimen name="previous_responses_item_exploration_split_view_margin_end">52dp</dimen>

<!-- Previous Responses Item: Exploration View -->
<dimen name="previous_responses_item_exploration_view_margin_start">60dp</dimen>
<dimen name="previous_responses_item_exploration_view_margin_end">92dp</dimen>

<!-- Previous Responses Item: Question Split View -->
<dimen name="previous_responses_item_question_split_view_margin_start">44dp</dimen>
<dimen name="previous_responses_item_question_split_view_margin_end">44dp</dimen>

<!-- Previous Responses Item: Question View -->
<dimen name="previous_responses_item_question_view_margin_start">76dp</dimen>
<dimen name="previous_responses_item_question_view_margin_end">76dp</dimen>
</resources>
Loading

0 comments on commit 7a2cede

Please sign in to comment.