aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-09-17 03:08:06 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-09-17 03:08:06 +0000
commita3367c193b2b9f6e385c155e543debd9f2bb3426 (patch)
tree7d2f3307682a697225763aa6977ad050283c151e /app/src/main/res
parent9979c91b3cc58a13e72e84208d1b79f71ee0dc50 (diff)
downloadinfinity-for-reddit-a3367c193b2b9f6e385c155e543debd9f2bb3426.tar
infinity-for-reddit-a3367c193b2b9f6e385c155e543debd9f2bb3426.tar.gz
infinity-for-reddit-a3367c193b2b9f6e385c155e543debd9f2bb3426.tar.bz2
infinity-for-reddit-a3367c193b2b9f6e385c155e543debd9f2bb3426.tar.lz
infinity-for-reddit-a3367c193b2b9f6e385c155e543debd9f2bb3426.tar.xz
infinity-for-reddit-a3367c193b2b9f6e385c155e543debd9f2bb3426.tar.zst
infinity-for-reddit-a3367c193b2b9f6e385c155e543debd9f2bb3426.zip
Select user flair in subreddits.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_outline_edit_24px.xml9
-rw-r--r--app/src/main/res/layout/activity_select_user_flair.xml32
-rw-r--r--app/src/main/res/layout/item_flair.xml3
-rw-r--r--app/src/main/res/layout/item_user_flair.xml32
-rw-r--r--app/src/main/res/menu/view_subreddit_detail_activity.xml6
-rw-r--r--app/src/main/res/values/strings.xml5
6 files changed, 77 insertions, 10 deletions
diff --git a/app/src/main/res/drawable/ic_outline_edit_24px.xml b/app/src/main/res/drawable/ic_outline_edit_24px.xml
deleted file mode 100644
index 17a2a81f..00000000
--- a/app/src/main/res/drawable/ic_outline_edit_24px.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<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="M14.06,9.02l0.92,0.92L5.92,19L5,19v-0.92l9.06,-9.06M17.66,3c-0.25,0 -0.51,0.1 -0.7,0.29l-1.83,1.83 3.75,3.75 1.83,-1.83c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.2,-0.2 -0.45,-0.29 -0.71,-0.29zM14.06,6.19L3,17.25L3,21h3.75L17.81,9.94l-3.75,-3.75z"/>
-</vector>
diff --git a/app/src/main/res/layout/activity_select_user_flair.xml b/app/src/main/res/layout/activity_select_user_flair.xml
new file mode 100644
index 00000000..40e3eb83
--- /dev/null
+++ b/app/src/main/res/layout/activity_select_user_flair.xml
@@ -0,0 +1,32 @@
+<?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"
+ android:id="@+id/coordinator_layout_select_user_flair_activity"
+ tools:context=".Activity.SelectUserFlairActivity">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/appbar_layout_select_user_flair_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:theme="@style/AppTheme.AppBarOverlay">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar_select_user_flair_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?attr/actionBarSize"
+ app:navigationIcon="?attr/homeAsUpIndicator"
+ app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_select_user_flair_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/item_flair.xml b/app/src/main/res/layout/item_flair.xml
index 9379800d..de10c3dd 100644
--- a/app/src/main/res/layout/item_flair.xml
+++ b/app/src/main/res/layout/item_flair.xml
@@ -22,10 +22,11 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical|end"
android:layout_marginStart="32dp"
- android:src="@drawable/ic_outline_edit_24px"
+ android:src="@drawable/ic_edit_24dp"
android:visibility="gone"
app:tint="?attr/primaryTextColor"
android:background="?actionBarItemBackground"
android:clickable="true"
android:focusable="true" />
+
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_user_flair.xml b/app/src/main/res/layout/item_user_flair.xml
new file mode 100644
index 00000000..e85daae8
--- /dev/null
+++ b/app/src/main/res/layout/item_user_flair.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?selectableItemBackground"
+ android:clickable="true"
+ android:focusable="true">
+
+ <TextView
+ android:id="@+id/user_flair_html_text_view_item_user_flair"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="16dp"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" />
+
+ <ImageView
+ android:id="@+id/edit_user_flair_image_view_item_user_flair"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="32dp"
+ android:padding="16dp"
+ android:src="@drawable/ic_edit_24dp"
+ android:background="?actionBarItemBackground"
+ android:clickable="true"
+ android:focusable="true" />
+
+</LinearLayout> \ 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 daea0d09..67a7bf24 100644
--- a/app/src/main/res/menu/view_subreddit_detail_activity.xml
+++ b/app/src/main/res/menu/view_subreddit_detail_activity.xml
@@ -35,6 +35,12 @@
app:showAsAction="never" />
<item
+ android:id="@+id/action_select_user_flair_view_subreddit_detail_activity"
+ android:orderInCategory="6"
+ android:title="@string/action_select_user_flair"
+ app:showAsAction="never" />
+
+ <item
android:id="@+id/action_share_view_subreddit_detail_activity"
android:orderInCategory="7"
android:title="@string/action_share"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 4087ee9f..6185b922 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -67,6 +67,7 @@
<string name="action_set_wallpaper">Set as Wallpaper</string>
<string name="action_send_private_message">Send Private Message</string>
<string name="action_block_user">Block User</string>
+ <string name="action_select_user_flair">Select User Flair</string>
<string name="parse_json_response_error">Error occurred when parsing the JSON response</string>
<string name="retrieve_token_error">Error Retrieving the token</string>
@@ -860,4 +861,8 @@
<string name="unlock_account_section">Unlock Account Section</string>
+ <string name="select_user_flair_success">User flair selected</string>
+ <string name="select_user_flair_failed">Cannot select user flair</string>
+ <string name="select_this_user_flair">Select this user flair?</string>
+
</resources>