diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-08-14 05:53:08 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-08-14 05:53:08 +0000 |
commit | eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17 (patch) | |
tree | cedd6330b86c51a237d28f29aed72bd66121d7dc /app/src/main/res | |
parent | a62f47aacb443df4f680ffb1321e84b7f54966f3 (diff) | |
download | infinity-for-reddit-eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17.tar infinity-for-reddit-eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17.tar.gz infinity-for-reddit-eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17.tar.bz2 infinity-for-reddit-eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17.tar.lz infinity-for-reddit-eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17.tar.xz infinity-for-reddit-eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17.tar.zst infinity-for-reddit-eaef58037c9df2cb7938c4a34f2ee5bcaf6b0d17.zip |
Editing flair is now available.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/ic_outline_edit_24px.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/layout/dialog_edit_flair.xml | 24 | ||||
-rw-r--r-- | app/src/main/res/layout/item_flair.xml | 26 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 4 |
4 files changed, 56 insertions, 7 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 new file mode 100644 index 00000000..17a2a81f --- /dev/null +++ b/app/src/main/res/drawable/ic_outline_edit_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="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/dialog_edit_flair.xml b/app/src/main/res/layout/dialog_edit_flair.xml new file mode 100644 index 00000000..7893cf66 --- /dev/null +++ b/app/src/main/res/layout/dialog_edit_flair.xml @@ -0,0 +1,24 @@ +<?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"> + + <EditText + android:id="@+id/flair_edit_text_edit_flair_dialog" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="24dp" + android:background="#00000000" + android:textColor="@color/primaryTextColor" + android:hint="@string/flair" + android:maxLength="64" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp" + android:text="@string/only_allow_64_chars" + android:textColor="@color/colorAccent"/> + +</LinearLayout>
\ 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 c6006358..7cce337f 100644 --- a/app/src/main/res/layout/item_flair.xml +++ b/app/src/main/res/layout/item_flair.xml @@ -1,16 +1,28 @@ <?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="wrap_content"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clickable="true" + android:focusable="true" + android:background="?attr/selectableItemBackground"> <TextView android:id="@+id/flair_text_view_item_flair" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="16dp" - android:textColor="@color/primaryTextColor" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> + android:textColor="@color/primaryTextColor" /> + <ImageView + android:id="@+id/edit_flair_image_view_item_flair" + android:layout_width="24dp" + android:layout_height="24dp" + android:layout_gravity="center_vertical|end" + android:layout_marginStart="32dp" + android:src="@drawable/ic_outline_edit_24px" + android:visibility="gone" + android:tint="@color/primaryTextColor" + android:background="?actionBarItemBackground" + android:clickable="true" + android:focusable="true" /> </LinearLayout>
\ 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 c7b64362..86af0755 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -194,6 +194,7 @@ <string name="edit">Edit</string> <string name="delete">Delete</string> <string name="cancel">Cancel</string> + <string name="ok">OK</string> <string name="edit_success">Edit successful</string> <string name="delete_post_success">Delete successfully</string> <string name="delete_post_failed">Delete failed</string> @@ -207,4 +208,7 @@ <string name="unmark_spoiler_failed">Unmark spoiler failed</string> <string name="update_flair_success">Update flair successful</string> <string name="update_flair_failed">Update flair failed</string> + + <string name="edit_flair">Edit Flair</string> + <string name="only_allow_64_chars">Only allow less than 64 characters</string> </resources> |