aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-07-10 07:59:47 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-07-10 07:59:47 +0000
commitbc91260e8a36524294c635970051f902ed533cfc (patch)
tree242b21381204700ece2eb6a7e7665633ec3d13b5 /app/src/main/res
parent117a33be3b3c112bcde45fce3974851a8ae58c47 (diff)
downloadinfinity-for-reddit-bc91260e8a36524294c635970051f902ed533cfc.tar
infinity-for-reddit-bc91260e8a36524294c635970051f902ed533cfc.tar.gz
infinity-for-reddit-bc91260e8a36524294c635970051f902ed533cfc.tar.bz2
infinity-for-reddit-bc91260e8a36524294c635970051f902ed533cfc.tar.lz
infinity-for-reddit-bc91260e8a36524294c635970051f902ed533cfc.tar.xz
infinity-for-reddit-bc91260e8a36524294c635970051f902ed533cfc.tar.zst
infinity-for-reddit-bc91260e8a36524294c635970051f902ed533cfc.zip
Place all the subscribed subreddits and users to SubscribedThingListingActivity instead of the navigation drawer in MainActivity.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_main.xml68
-rw-r--r--app/src/main/res/layout/activity_post_text.xml8
-rw-r--r--app/src/main/res/layout/activity_subreddit_selection.xml14
-rw-r--r--app/src/main/res/layout/activity_subscribed_thing_listing.xml45
-rw-r--r--app/src/main/res/layout/fragment_followed_users_listing.xml34
-rw-r--r--app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml34
-rw-r--r--app/src/main/res/layout/item_subscribed_thing.xml3
-rw-r--r--app/src/main/res/values/strings.xml7
8 files changed, 186 insertions, 27 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index f0ba107e..6c30dbc2 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -58,36 +58,62 @@
</LinearLayout>
+ <LinearLayout
+ android:id="@+id/subscriptions_linear_layout_main_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:padding="16dp">
+
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:layout_marginEnd="32dp"
+ android:src="@drawable/ic_outline_account_circle_24px"
+ android:tint="@color/primaryTextColor"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/subscriptions"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/dividerColor" />
- <TextView
- android:id="@+id/following_label_main_activity"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:id="@+id/settings_linear_layout_main_activity"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:text="@string/following"
- android:visibility="gone" />
+ android:background="?attr/selectableItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:padding="16dp">
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/subscribed_user_recycler_view_main_activity"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ <ImageView
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_gravity="center_vertical"
+ android:layout_marginEnd="32dp"
+ android:src="@drawable/ic_outline_account_circle_24px"
+ android:tint="@color/primaryTextColor"/>
- <TextView
- android:id="@+id/subscriptions_label_main_activity"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_margin="16dp"
- android:text="@string/subscriptions"
- android:visibility="gone" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/settings"
+ android:textColor="@color/primaryTextColor" />
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/subscribed_subreddit_recycler_view_main_activity"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ </LinearLayout>
</LinearLayout>
diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml
index cb08e1f2..9bc76c10 100644
--- a/app/src/main/res/layout/activity_post_text.xml
+++ b/app/src/main/res/layout/activity_post_text.xml
@@ -8,7 +8,8 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
@@ -28,8 +29,7 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
- android:src="@drawable/subreddit_default_icon" />
+ android:layout_centerVertical="true" />
<TextView
android:id="@+id/subreddit_name_text_view_post_text_activity"
@@ -78,7 +78,7 @@
<EditText
android:id="@+id/post_text_content_edit_text_post_text_activity"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:gravity="top"
android:padding="16dp"
android:hint="@string/post_text_content_hint"
diff --git a/app/src/main/res/layout/activity_subreddit_selection.xml b/app/src/main/res/layout/activity_subreddit_selection.xml
new file mode 100644
index 00000000..bb8b13b8
--- /dev/null
+++ b/app/src/main/res/layout/activity_subreddit_selection.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout 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"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".SubredditSelectionActivity">
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_subreddit_selection_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_subscribed_thing_listing.xml b/app/src/main/res/layout/activity_subscribed_thing_listing.xml
new file mode 100644
index 00000000..e0d3c8ee
--- /dev/null
+++ b/app/src/main/res/layout/activity_subscribed_thing_listing.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".SubscribedThingListingActivity">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/appbar_subscribed_thing_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:theme="@style/AppTheme.AppBarOverlay">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar_subscribed_thing_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ android:background="?attr/colorPrimary"
+ app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+ <com.google.android.material.tabs.TabLayout
+ android:id="@+id/tab_layout_subscribed_thing_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/colorPrimary"
+ app:tabGravity="fill"
+ app:tabMode="fixed"
+ app:tabIndicatorColor="@android:color/white"
+ app:tabIndicatorHeight="3dp"
+ app:tabSelectedTextColor="@android:color/white"
+ app:tabTextColor="@android:color/white"
+ app:tabRippleColor="?attr/colorControlHighlight"
+ app:tabUnboundedRipple="false" />
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <androidx.viewpager.widget.ViewPager
+ android:id="@+id/view_pager_subscribed_thing_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
+ tools:context=".SubscribedThingListingActivity" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_followed_users_listing.xml b/app/src/main/res/layout/fragment_followed_users_listing.xml
new file mode 100644
index 00000000..7e0c58f3
--- /dev/null
+++ b/app/src/main/res/layout/fragment_followed_users_listing.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".FollowedUsersListingFragment">
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_followed_users_listing_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <LinearLayout
+ android:id="@+id/no_subscriptions_linear_layout_followed_users_listing_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:visibility="gone">
+
+ <ImageView
+ android:id="@+id/no_subscriptions_image_view_followed_users_listing_fragment"
+ android:layout_width="150dp"
+ android:layout_height="wrap_content" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:gravity="center" />
+
+ </LinearLayout>
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml b/app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml
new file mode 100644
index 00000000..b493d50b
--- /dev/null
+++ b/app/src/main/res/layout/fragment_subscribed_subreddits_listing.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".SubscribedSubredditsListingFragment">
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_subscribed_subreddits_listing_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <LinearLayout
+ android:id="@+id/no_subscriptions_linear_layout_subreddits_listing_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:visibility="gone">
+
+ <ImageView
+ android:id="@+id/no_subscriptions_image_view_subreddits_listing_fragment"
+ android:layout_width="150dp"
+ android:layout_height="wrap_content" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:gravity="center" />
+
+ </LinearLayout>
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_subscribed_thing.xml b/app/src/main/res/layout/item_subscribed_thing.xml
index 0f4afc20..d7ede059 100644
--- a/app/src/main/res/layout/item_subscribed_thing.xml
+++ b/app/src/main/res/layout/item_subscribed_thing.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
android:clickable="true"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 726e34b6..effd81dc 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -4,7 +4,8 @@
<string name="search_activity_label">Search</string>
<string name="comment_activity_label">Add Comment</string>
<string name="comment_activity_label_is_replying">Reply</string>
- <string name="post_text_activity">Text Post</string>
+ <string name="post_text_activity_label">Text Post</string>
+ <string name="subreddit_selection_activity_label">Select a Subreddit</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
@@ -41,6 +42,7 @@
<string name="profile">Profile</string>
<string name="following">Following</string>
<string name="subscriptions">Subscriptions</string>
+ <string name="settings">Settings</string>
<string name="subscribers_number_detail">Subscribers: %1$d</string>
<string name="online_subscribers_number_detail">Online: %1$d</string>
<string name="cannot_fetch_subreddit_info">Cannot fetch subreddit info</string>
@@ -91,4 +93,7 @@
<string name="post_url_hint">URL</string>
<string name="choose_a_subreddit">Choose a subreddit</string>
<string name="rules">Rules</string>
+
+ <string name="subreddits">Subreddits</string>
+ <string name="users">Users</string>
</resources>