From 216228cf0275d84d1895114fd92cb83a70318c81 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Thu, 18 Jul 2019 23:59:14 +0800 Subject: Add a search button in ViewSubredditDetailActivity and ViewUserDetailActivity. Search posts in a specific subreddit is available. Rename SearchActivity to SearchResultActivity. Add SearchActivity for searching instead of searching in MainActivity. --- app/src/main/res/menu/menu_search.xml | 5 +++-- app/src/main/res/menu/search_activity.xml | 12 ++++++++++++ app/src/main/res/menu/search_result_activity.xml | 16 ++++++++++++++++ app/src/main/res/menu/view_subreddit_detail_activity.xml | 10 ++++++++-- app/src/main/res/menu/view_user_detail_activity.xml | 10 ++++++++-- 5 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 app/src/main/res/menu/search_activity.xml create mode 100644 app/src/main/res/menu/search_result_activity.xml (limited to 'app/src/main/res/menu') diff --git a/app/src/main/res/menu/menu_search.xml b/app/src/main/res/menu/menu_search.xml index afd34627..f0cff4fd 100644 --- a/app/src/main/res/menu/menu_search.xml +++ b/app/src/main/res/menu/menu_search.xml @@ -1,10 +1,11 @@ + tools:context="ml.docilealligator.infinityforreddit.SearchResultActivity"> + android:icon="@drawable/ic_search_white_24dp" + app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/search_activity.xml b/app/src/main/res/menu/search_activity.xml new file mode 100644 index 00000000..c4820b38 --- /dev/null +++ b/app/src/main/res/menu/search_activity.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/menu/search_result_activity.xml b/app/src/main/res/menu/search_result_activity.xml new file mode 100644 index 00000000..1fe4fd88 --- /dev/null +++ b/app/src/main/res/menu/search_result_activity.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/view_subreddit_detail_activity.xml b/app/src/main/res/menu/view_subreddit_detail_activity.xml index ede3e6b9..41e83e7d 100644 --- a/app/src/main/res/menu/view_subreddit_detail_activity.xml +++ b/app/src/main/res/menu/view_subreddit_detail_activity.xml @@ -4,15 +4,21 @@ xmlns:tools="http://schemas.android.com/tools" tools:context="ml.docilealligator.infinityforreddit.ViewSubredditDetailActivity"> + \ No newline at end of file diff --git a/app/src/main/res/menu/view_user_detail_activity.xml b/app/src/main/res/menu/view_user_detail_activity.xml index 6f550333..58e469e9 100644 --- a/app/src/main/res/menu/view_user_detail_activity.xml +++ b/app/src/main/res/menu/view_user_detail_activity.xml @@ -3,15 +3,21 @@ xmlns:tools="http://schemas.android.com/tools" tools:context="ml.docilealligator.infinityforreddit.ViewUserDetailActivity"> + -- cgit v1.2.3