From 6662f9af34d21820a0cf70caba6017e35cd81db6 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 20 Oct 2019 23:23:56 +0800 Subject: Fixed bottom sheet fragments cannot swipe down to show items when they are expanded. Version 1.3.1. --- .../infinityforreddit/Fragment/PostFragment.java | 5 +- ...ragment_post_comment_sort_type_bottom_sheet.xml | 263 +++++++++++---------- .../res/layout/fragment_post_type_bottom_sheet.xml | 227 +++++++++--------- ...fragment_search_post_sort_type_bottom_sheet.xml | 154 ++++++------ ...h_user_and_subreddit_sort_type_bottom_sheet.xml | 67 +++--- .../res/layout/fragment_sort_time_bottom_sheet.xml | 179 +++++++------- .../res/layout/fragment_sort_type_bottom_sheet.xml | 210 ++++++++-------- 7 files changed, 576 insertions(+), 529 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java index 23bd0cd1..e5f8c2f3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java @@ -269,7 +269,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } int postType = getArguments().getInt(EXTRA_POST_TYPE); - //String sortType = getArguments().getString(EXTRA_SORT_TYPE); int filter = getArguments().getInt(EXTRA_FILTER); String accessToken = getArguments().getString(EXTRA_ACCESS_TOKEN); @@ -491,6 +490,10 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } public void changeSortType(SortType sortType) { + if (mFetchPostInfoLinearLayout.getVisibility() != View.GONE) { + mFetchPostInfoLinearLayout.setVisibility(View.GONE); + mGlide.clear(mFetchPostInfoImageView); + } mPostViewModel.changeSortType(sortType); } diff --git a/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml index 7673abba..7f7fae31 100644 --- a/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml @@ -1,144 +1,151 @@ - - + android:orientation="vertical"> - + - + - + - + - + - + - + - + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml index aa15e791..8025c8d0 100644 --- a/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml @@ -1,128 +1,135 @@ - + android:overScrollMode="never"> - - - - + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" > + + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml index 8b615fc8..88b5391f 100644 --- a/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml @@ -1,82 +1,90 @@ - + - + android:orientation="vertical"> - + - + - + - + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml index 79579bfa..852cfc6c 100644 --- a/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml @@ -1,38 +1,45 @@ - + android:overScrollMode="never"> - + android:orientation="vertical"> - + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml b/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml index d08066e0..5975b2cc 100644 --- a/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml @@ -1,100 +1,107 @@ - - + android:orientation="vertical"> - + - + - + - + - + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml index a92cfc2c..731f35df 100644 --- a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml @@ -1,112 +1,120 @@ - + - + android:orientation="vertical"> - + - + - + - + - + - + + + + + - \ No newline at end of file + \ No newline at end of file -- cgit v1.2.3