diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_outline_sort_24px.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_post_video.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml | 97 | ||||
-rw-r--r-- | app/src/main/res/layout/sort_type_bottom_sheet.xml | 97 | ||||
-rw-r--r-- | app/src/main/res/menu/main_activity.xml | 13 | ||||
-rw-r--r-- | app/src/main/res/menu/view_subreddit_detail_activity.xml | 13 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 12 |
7 files changed, 238 insertions, 11 deletions
diff --git a/app/src/main/res/drawable/ic_outline_sort_24px.xml b/app/src/main/res/drawable/ic_outline_sort_24px.xml new file mode 100644 index 00000000..e795d2a2 --- /dev/null +++ b/app/src/main/res/drawable/ic_outline_sort_24px.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="#FFFFFF" + android:pathData="M3,18h6v-2L3,16v2zM3,6v2h18L21,6L3,6zM3,13h12v-2L3,11v2z"/> +</vector> diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index f0df4eea..d1c3ed58 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -166,13 +166,11 @@ android:textColor="@color/colorAccent" android:visibility="gone" /> - <ImageView - android:id="@+id/image_view_post_video_activity" + <VideoView + android:id="@+id/video_view_post_video_activity" android:layout_width="match_parent" android:layout_height="wrap_content" - android:scaleType="fitStart" - android:adjustViewBounds="true" - android:visibility="gone" /> + android:visibility="gone"/> </LinearLayout> 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 new file mode 100644 index 00000000..bdf38858 --- /dev/null +++ b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="match_parent" + android:layout_height="match_parent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:text="@string/sort" + android:textSize="18sp" /> + + <TextView + android:id="@+id/best_type_text_view_sort_type_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_best" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/hot_type_text_view_sort_type_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_hot" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/new_type_text_view_sort_type_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_new" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/random_type_text_view_sort_type_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_random" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/rising_type_text_view_sort_type_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_rising" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/top_type_text_view_sort_type_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_top" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet_fragment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_rising" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/sort_type_bottom_sheet.xml b/app/src/main/res/layout/sort_type_bottom_sheet.xml new file mode 100644 index 00000000..5951b431 --- /dev/null +++ b/app/src/main/res/layout/sort_type_bottom_sheet.xml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="match_parent" + android:layout_height="match_parent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:padding="16dp" + android:text="@string/sort" + android:textSize="18sp" /> + + <TextView + android:id="@+id/best_type_text_view_sort_type_bottom_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_best" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/hot_type_text_view_sort_type_bottom_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_hot" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/new_type_text_view_sort_type_bottom_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_new" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/random_type_text_view_sort_type_bottom_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_random" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/rising_type_text_view_sort_type_bottom_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_rising" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/top_type_text_view_sort_type_bottom_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_top" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + + <TextView + android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sort_rising" + android:textColor="@color/primaryTextColor" + android:textSize="18sp" + android:padding="16dp" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground" /> + +</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/menu/main_activity.xml b/app/src/main/res/menu/main_activity.xml index 2d4d02ad..43cb0785 100644 --- a/app/src/main/res/menu/main_activity.xml +++ b/app/src/main/res/menu/main_activity.xml @@ -4,21 +4,28 @@ xmlns:tools="http://schemas.android.com/tools" tools:context="ml.docilealligator.infinityforreddit.MainActivity"> <item - android:id="@+id/action_search_main_activity" + android:id="@+id/action_sort_main_activity" android:orderInCategory="1" android:title="@string/action_search" + android:icon="@drawable/ic_outline_sort_24px" + app:showAsAction="ifRoom" /> + + <item + android:id="@+id/action_search_main_activity" + android:orderInCategory="2" + android:title="@string/action_search" android:icon="@drawable/ic_search_white_24dp" app:showAsAction="ifRoom" /> <item android:id="@+id/action_refresh_main_activity" - android:orderInCategory="2" + android:orderInCategory="3" android:title="@string/action_refresh" app:showAsAction="never" /> <item android:id="@+id/action_lazy_mode_main_activity" - android:orderInCategory="3" + android:orderInCategory="4" 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_subreddit_detail_activity.xml b/app/src/main/res/menu/view_subreddit_detail_activity.xml index 41e83e7d..9dcdb633 100644 --- a/app/src/main/res/menu/view_subreddit_detail_activity.xml +++ b/app/src/main/res/menu/view_subreddit_detail_activity.xml @@ -4,21 +4,28 @@ xmlns:tools="http://schemas.android.com/tools" tools:context="ml.docilealligator.infinityforreddit.ViewSubredditDetailActivity"> <item - android:id="@+id/action_search_view_subreddit_detail_activity" + android:id="@+id/action_sort_view_subreddit_detail_activity" android:orderInCategory="1" android:title="@string/action_search" + android:icon="@drawable/ic_outline_sort_24px" + app:showAsAction="ifRoom" /> + + <item + android:id="@+id/action_search_view_subreddit_detail_activity" + android:orderInCategory="2" + 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:orderInCategory="3" 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="3" + android:orderInCategory="4" android:title="@string/action_start_lazy_mode" app:showAsAction="never" /> </menu>
\ 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 c7c521ad..80775602 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -133,4 +133,16 @@ <string name="all_subreddits">All subreddits</string> <string name="error_loading_post">Error loading this post.\nTap to retry.</string> + + <string name="sort">Sort</string> + <string name="sort_best">Best</string> + <string name="sort_hot">Hot</string> + <string name="sort_new">New</string> + <string name="sort_random">Random</string> + <string name="sort_rising">Rising</string> + <string name="sort_top">Top</string> + <string name="sort_controversial">Controversial</string> + + <!-- TODO: Remove or change this placeholder text --> + <string name="hello_blank_fragment">Hello blank fragment</string> </resources> |