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 ++--- app/src/main/res/menu/search_result_activity.xml | 11 +++- app/src/main/res/values-night/colors.xml | 4 ++ app/src/main/res/values/colors.xml | 2 + app/src/main/res/values/dimens.xml | 1 - app/src/main/res/values/strings.xml | 6 +- 9 files changed, 153 insertions(+), 37 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') 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"> - - + + \ No newline at end of file diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 6b6e8290..a08dfe08 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -23,4 +23,8 @@ #121212 #1565C0 + + #242424 + + #000000 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index a4f27cd2..ff024d93 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -24,5 +24,7 @@ @color/colorPrimaryDark + #FFFFFF + #000000 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index ddc21110..eabd373e 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -7,7 +7,6 @@ 16dp 180dp 16dp - 0dp 0dp 0dp \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 80775602..8be8345e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -142,7 +142,7 @@ Rising Top Controversial - - - Hello blank fragment + Relevance + Comments + Activity -- cgit v1.2.3