aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-08-14 07:54:08 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-08-14 07:54:08 +0000
commit7cdf5d2e4c46da1830dd81c4929857e7496491e5 (patch)
tree54017ca56e9e490aadd24c8646b74ea2c3df54a8 /app/src/main/res
parenteaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17 (diff)
downloadinfinity-for-reddit-7cdf5d2e4c46da1830dd81c4929857e7496491e5.tar
infinity-for-reddit-7cdf5d2e4c46da1830dd81c4929857e7496491e5.tar.gz
infinity-for-reddit-7cdf5d2e4c46da1830dd81c4929857e7496491e5.tar.bz2
infinity-for-reddit-7cdf5d2e4c46da1830dd81c4929857e7496491e5.tar.lz
infinity-for-reddit-7cdf5d2e4c46da1830dd81c4929857e7496491e5.tar.xz
infinity-for-reddit-7cdf5d2e4c46da1830dd81c4929857e7496491e5.tar.zst
infinity-for-reddit-7cdf5d2e4c46da1830dd81c4929857e7496491e5.zip
Current user's upvoted, downvoted, hidden, saved, gilded posts are now available to see.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_outline_bookmarks_24px.xml9
-rw-r--r--app/src/main/res/drawable/ic_outline_lock_24px.xml9
-rw-r--r--app/src/main/res/drawable/ic_outline_star_border_24px.xml9
-rw-r--r--app/src/main/res/layout/activity_account_posts.xml39
-rw-r--r--app/src/main/res/layout/activity_main.xml130
-rw-r--r--app/src/main/res/values/strings.xml7
6 files changed, 202 insertions, 1 deletions
diff --git a/app/src/main/res/drawable/ic_outline_bookmarks_24px.xml b/app/src/main/res/drawable/ic_outline_bookmarks_24px.xml
new file mode 100644
index 00000000..33ceac3f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_outline_bookmarks_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="#FF000000"
+ android:pathData="M15,7v12.97l-4.21,-1.81 -0.79,-0.34 -0.79,0.34L5,19.97L5,7h10m4,-6L8.99,1C7.89,1 7,1.9 7,3h10c1.1,0 2,0.9 2,2v13l2,1L21,3c0,-1.1 -0.9,-2 -2,-2zM15,5L5,5c-1.1,0 -2,0.9 -2,2v16l7,-3 7,3L17,7c0,-1.1 -0.9,-2 -2,-2z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_outline_lock_24px.xml b/app/src/main/res/drawable/ic_outline_lock_24px.xml
new file mode 100644
index 00000000..f4299e6c
--- /dev/null
+++ b/app/src/main/res/drawable/ic_outline_lock_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="#FF000000"
+ android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM9,6c0,-1.66 1.34,-3 3,-3s3,1.34 3,3v2L9,8L9,6zM18,20L6,20L6,10h12v10zM12,17c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z"/>
+</vector>
diff --git a/app/src/main/res/drawable/ic_outline_star_border_24px.xml b/app/src/main/res/drawable/ic_outline_star_border_24px.xml
new file mode 100644
index 00000000..0186669d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_outline_star_border_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="#FF000000"
+ android:pathData="M22,9.24l-7.19,-0.62L12,2 9.19,8.63 2,9.24l5.46,4.73L5.82,21 12,17.27 18.18,21l-1.63,-7.03L22,9.24zM12,15.4l-3.76,2.27 1,-4.28 -3.32,-2.88 4.38,-0.38L12,6.1l1.71,4.04 4.38,0.38 -3.32,2.88 1,4.28L12,15.4z"/>
+</vector>
diff --git a/app/src/main/res/layout/activity_account_posts.xml b/app/src/main/res/layout/activity_account_posts.xml
new file mode 100644
index 00000000..ecdda049
--- /dev/null
+++ b/app/src/main/res/layout/activity_account_posts.xml
@@ -0,0 +1,39 @@
+<?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=".AccountPostsActivity">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/appbar_layout_account_posts_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:theme="@style/AppTheme.AppBarOverlay">
+
+ <com.google.android.material.appbar.CollapsingToolbarLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_scrollFlags="scroll|enterAlways"
+ app:titleEnabled="false"
+ app:toolbarId="@+id/toolbar_account_posts_activity">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar_account_posts_activity"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ app:popupTheme="@style/AppTheme.PopupOverlay"
+ app:navigationIcon="?attr/homeAsUpIndicator" />
+
+ </com.google.android.material.appbar.CollapsingToolbarLayout>
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <FrameLayout
+ android:id="@+id/frame_layout_account_posts_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index b1572144..407c2a1d 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -90,6 +90,136 @@
</LinearLayout>
+ <LinearLayout
+ android:id="@+id/upvoted_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_arrow_upward_black_24dp"
+ android:tint="@color/primaryTextColor"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/upvoted"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/downvoted_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_arrow_downward_black_24dp"
+ android:tint="@color/primaryTextColor"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/downvoted"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/hidden_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_lock_24px"
+ android:tint="@color/primaryTextColor"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/hidden"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/saved_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_bookmarks_24px"
+ android:tint="@color/primaryTextColor"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/saved"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:id="@+id/gilded_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_star_border_24px"
+ android:tint="@color/primaryTextColor"/>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/gilded"
+ android:textColor="@color/primaryTextColor" />
+
+ </LinearLayout>
+
<View
android:id="@+id/divider_main_activity"
android:layout_width="match_parent"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 86af0755..742706ea 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -63,13 +63,18 @@
<string name="profile">Profile</string>
<string name="following">Following</string>
<string name="subscriptions">Subscriptions</string>
+ <string name="upvoted">Upvoted</string>
+ <string name="downvoted">Downvoted</string>
+ <string name="hidden">Hidden</string>
+ <string name="saved">Saved</string>
+ <string name="gilded">Gilded</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>
<string name="cannot_fetch_user_info">Cannot fetch user info</string>
- <string name="gilded">x%1$d</string>
+ <string name="gilded_count">x%1$d</string>
<string name="title_activity_view_user_detail">ViewUserDetailActivity</string>
<string name="subscribe">Subscribe</string>