From 111ba8e5fc95c3fb5dbbff472e1a8dbbb52a28af Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 29 Jul 2019 00:52:08 +0800 Subject: Sorting in SearchResultActivity is available. Switch DataSource instead of replacing fragments when changing sorting types. Minor bugs fixed. --- .../res/layout/fragment_post_type_bottom_sheet.xml | 35 +++++----- ...fragment_search_post_sort_type_bottom_sheet.xml | 77 ++++++++++++++++++++++ ...h_user_and_subreddit_sort_type_bottom_sheet.xml | 36 ++++++++++ .../res/layout/fragment_sort_type_bottom_sheet.xml | 18 ++--- 4 files changed, 135 insertions(+), 31 deletions(-) create mode 100644 app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml create mode 100644 app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml (limited to 'app/src/main/res/layout') 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 1e3659d1..81f20963 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,18 +1,9 @@ - - + android:paddingBottom="8dp" + android:orientation="vertical"> @@ -38,7 +29,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_text" /> + android:text="@string/bottom_sheet_post_text" + android:textColor="@color/primaryTextColor" /> @@ -58,7 +50,7 @@ android:layout_width="18dp" android:layout_height="18dp" android:layout_gravity="center_vertical" - android:layout_marginEnd="32dp" + android:layout_marginEnd="48dp" android:src="@drawable/ic_link" android:tint="@color/primaryTextColor" /> @@ -66,7 +58,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_link" /> + android:text="@string/bottom_sheet_post_link" + android:textColor="@color/primaryTextColor" /> @@ -86,7 +79,7 @@ android:layout_width="18dp" android:layout_height="18dp" android:layout_gravity="center_vertical" - android:layout_marginEnd="32dp" + android:layout_marginEnd="48dp" android:src="@drawable/ic_menu_gallery" android:tint="@color/primaryTextColor" /> @@ -94,7 +87,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_image" /> + android:text="@string/bottom_sheet_post_image" + android:textColor="@color/primaryTextColor" /> @@ -114,7 +108,7 @@ @@ -123,7 +117,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_video" /> + android:text="@string/bottom_sheet_post_video" + android:textColor="@color/primaryTextColor" /> 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 new file mode 100644 index 00000000..1db23d62 --- /dev/null +++ b/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + \ 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 new file mode 100644 index 00000000..acc7e65a --- /dev/null +++ b/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml @@ -0,0 +1,36 @@ + + + + + + + + \ 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 d3977d81..e059a36b 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 @@ -4,22 +4,12 @@ android:layout_height="match_parent" android:paddingBottom="8dp"> - -