Skip to content

Commit

Permalink
Fixes part of #40: Added bottom padding to Question Player (#3250)
Browse files Browse the repository at this point in the history
* Added bottom padding

* Added TODO

* Updated bottom padding

* Updated bottom padding

* Updated bottom padding correctly

Co-authored-by: Rajat Talesra <[email protected]>
  • Loading branch information
rt4914 and Rajat Talesra authored Jul 6, 2021
1 parent 31851ca commit 09e3692
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/src/main/res/layout-land/question_player_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingBottom="@dimen/general_screen_padding_bottom"
app:data="@{viewModel.itemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@id/question_progress_bar"
Expand All @@ -70,9 +71,11 @@
android:id="@+id/extra_interaction_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingBottom="@dimen/general_screen_padding_bottom"
android:visibility="@{viewModel.isSplitView ? View.VISIBLE : View.GONE}"
app:data="@{viewModel.rightItemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
android:id="@+id/question_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingTop="24dp"
android:paddingBottom="@dimen/general_screen_padding_bottom"
app:data="@{viewModel.itemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@id/question_progress_bar"
Expand All @@ -70,10 +72,12 @@
android:id="@+id/extra_interaction_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingTop="24dp"
android:paddingBottom="@dimen/general_screen_padding_bottom"
android:visibility="@{viewModel.isSplitView ? View.VISIBLE : View.GONE}"
app:data="@{viewModel.rightItemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
android:id="@+id/question_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingTop="24dp"
android:paddingBottom="@dimen/general_screen_padding_bottom"
app:data="@{viewModel.itemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@id/question_progress_bar"
Expand All @@ -70,10 +72,12 @@
android:id="@+id/extra_interaction_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingTop="24dp"
android:paddingBottom="@dimen/general_screen_padding_bottom"
android:visibility="@{viewModel.isSplitView ? View.VISIBLE : View.GONE}"
app:data="@{viewModel.rightItemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/layout/question_player_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@
android:id="@+id/question_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingBottom="@dimen/general_screen_padding_bottom"
app:data="@{viewModel.itemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@id/question_progress_bar"
Expand All @@ -69,9 +71,11 @@
android:id="@+id/extra_interaction_recycler_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:divider="@android:color/transparent"
android:dividerHeight="8dp"
android:overScrollMode="never"
android:paddingBottom="@dimen/general_screen_padding_bottom"
android:visibility="@{viewModel.isSplitView ? View.VISIBLE : View.GONE}"
app:data="@{viewModel.rightItemList}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
<dimen name="faq_item_header_margin_bottom">8dp</dimen>

<!-- General Bottom Padding -->
<dimen name="general_screen_padding_bottom">160dp</dimen>
<dimen name="general_screen_padding_bottom">128dp</dimen>

<!-- Profile Edit -->
<dimen name="profile_edit_delete_margin_bottom">12dp</dimen>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class QuestionPlayerActivityTest {
}
}

@Test
@Test // TODO(#3370): Tests pass on Pixel 3 XL and fails on Pixel 3 because of screen size.
fun testQuestionPlayer_landscape_forMisconception_showsLinkTextForConceptCard() {
launchForSkillList(SKILL_ID_LIST).use {
rotateToLandscape()
Expand Down Expand Up @@ -240,7 +240,7 @@ class QuestionPlayerActivityTest {
}
}

@Test
@Test // TODO(#3370): Tests pass on Pixel 3 XL and fails on Pixel 3 because of screen size.
@DisableAccessibilityChecks // TODO(#3362): Enable AccessibilityChecks
fun testQuestionPlayer_landscape_forMisconception_clickLinkText_opensConceptCard() {
launchForSkillList(SKILL_ID_LIST).use {
Expand Down

0 comments on commit 09e3692

Please sign in to comment.