aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/menu
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-07-18 15:59:14 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-07-18 15:59:14 +0000
commit216228cf0275d84d1895114fd92cb83a70318c81 (patch)
tree090554108ce267b9d531c465ba4b6445f5e1ec66 /app/src/main/res/menu
parent611d6a90ec39707b4d4161da1eb5b19249e670c4 (diff)
downloadinfinity-for-reddit-216228cf0275d84d1895114fd92cb83a70318c81.tar
infinity-for-reddit-216228cf0275d84d1895114fd92cb83a70318c81.tar.gz
infinity-for-reddit-216228cf0275d84d1895114fd92cb83a70318c81.tar.bz2
infinity-for-reddit-216228cf0275d84d1895114fd92cb83a70318c81.tar.lz
infinity-for-reddit-216228cf0275d84d1895114fd92cb83a70318c81.tar.xz
infinity-for-reddit-216228cf0275d84d1895114fd92cb83a70318c81.tar.zst
infinity-for-reddit-216228cf0275d84d1895114fd92cb83a70318c81.zip
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.
Diffstat (limited to 'app/src/main/res/menu')
-rw-r--r--app/src/main/res/menu/menu_search.xml5
-rw-r--r--app/src/main/res/menu/search_activity.xml12
-rw-r--r--app/src/main/res/menu/search_result_activity.xml16
-rw-r--r--app/src/main/res/menu/view_subreddit_detail_activity.xml10
-rw-r--r--app/src/main/res/menu/view_user_detail_activity.xml10
5 files changed, 47 insertions, 6 deletions
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 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
- tools:context="ml.docilealligator.infinityforreddit.SearchActivity">
+ tools:context="ml.docilealligator.infinityforreddit.SearchResultActivity">
<item
android:id="@+id/action_search_search_activity"
android:orderInCategory="1"
android:title="@string/action_search"
- app:showAsAction="always" />
+ android:icon="@drawable/ic_search_white_24dp"
+ app:showAsAction="ifRoom" />
</menu>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:context="ml.docilealligator.infinityforreddit.SearchResultActivity">
+ <item
+ android:id="@+id/action_search_search_activity"
+ android:orderInCategory="1"
+ android:title="@string/action_search"
+ android:icon="@drawable/ic_search_white_24dp"
+ app:showAsAction="ifRoom" />
+</menu>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <item
+ android:id="@+id/action_search_search_result_activity"
+ android:orderInCategory="1"
+ android:title="@string/action_search"
+ android:icon="@drawable/ic_search_white_24dp"
+ app:showAsAction="ifRoom" />
+
+ <item
+ android:id="@+id/action_refresh_search_result_activity"
+ android:orderInCategory="2"
+ android:title="@string/action_refresh"
+ app:showAsAction="never" />
+</menu> \ 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">
<item
- android:id="@+id/action_refresh_view_subreddit_detail_activity"
+ android:id="@+id/action_search_view_subreddit_detail_activity"
android:orderInCategory="1"
+ android:title="@string/action_search"
+ android:icon="@drawable/ic_search_white_24dp"
+ app:showAsAction="ifRoom" />
+ <item
+ android:id="@+id/action_refresh_view_subreddit_detail_activity"
+ android:orderInCategory="2"
android:title="@string/action_refresh"
android:icon="@drawable/ic_refresh_white_24dp"
app:showAsAction="never" />
<item
android:id="@+id/action_lazy_mode_view_subreddit_detail_activity"
- android:orderInCategory="2"
+ android:orderInCategory="3"
android:title="@string/action_start_lazy_mode"
app:showAsAction="never" />
</menu> \ 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">
<item
- android:id="@+id/action_refresh_view_user_detail_activity"
+ android:id="@+id/action_search_view_user_detail_activity"
android:orderInCategory="1"
+ android:title="@string/action_search"
+ android:icon="@drawable/ic_search_white_24dp"
+ app:showAsAction="ifRoom" />
+ <item
+ android:id="@+id/action_refresh_view_user_detail_activity"
+ android:orderInCategory="2"
android:title="@string/action_refresh"
android:icon="@drawable/ic_refresh_white_24dp"
app:showAsAction="never" />
<item
android:id="@+id/action_lazy_mode_view_user_detail_activity"
- android:orderInCategory="2"
+ android:orderInCategory="3"
android:title="@string/action_start_lazy_mode"
app:showAsAction="never" />
</menu>