aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-07-18 04:00:46 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-07-18 04:00:46 +0000
commit611d6a90ec39707b4d4161da1eb5b19249e670c4 (patch)
treec5df1e52265e0593ae936be2242727804b886834 /app/src/main/res
parent42497bb2475bbd0edaff79a6f1aaf99104e1b84b (diff)
downloadinfinity-for-reddit-611d6a90ec39707b4d4161da1eb5b19249e670c4.tar
infinity-for-reddit-611d6a90ec39707b4d4161da1eb5b19249e670c4.tar.gz
infinity-for-reddit-611d6a90ec39707b4d4161da1eb5b19249e670c4.tar.bz2
infinity-for-reddit-611d6a90ec39707b4d4161da1eb5b19249e670c4.tar.lz
infinity-for-reddit-611d6a90ec39707b4d4161da1eb5b19249e670c4.tar.xz
infinity-for-reddit-611d6a90ec39707b4d4161da1eb5b19249e670c4.tar.zst
infinity-for-reddit-611d6a90ec39707b4d4161da1eb5b19249e670c4.zip
Viewing rules after pressing rules button in PostXXXActivity is available. Extend MarkwonView to support opening reddit subreddit and user links.
Diffstat (limited to '')
-rw-r--r--app/src/main/res/layout/activity_rules.xml27
-rw-r--r--app/src/main/res/layout/item_comment.xml2
-rw-r--r--app/src/main/res/layout/item_post_detail.xml2
-rw-r--r--app/src/main/res/layout/item_rule.xml22
-rw-r--r--app/src/main/res/values/strings.xml4
5 files changed, 55 insertions, 2 deletions
diff --git a/app/src/main/res/layout/activity_rules.xml b/app/src/main/res/layout/activity_rules.xml
new file mode 100644
index 00000000..6678f13c
--- /dev/null
+++ b/app/src/main/res/layout/activity_rules.xml
@@ -0,0 +1,27 @@
+<?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=".RulesActivity">
+
+ <ProgressBar
+ android:id="@+id/progress_bar_rules_activity"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center" />
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_rules_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+
+ <TextView
+ android:id="@+id/error_text_view_rules_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:visibility="gone" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml
index 088943f7..d03b0bad 100644
--- a/app/src/main/res/layout/item_comment.xml
+++ b/app/src/main/res/layout/item_comment.xml
@@ -42,7 +42,7 @@
</LinearLayout>
- <ru.noties.markwon.view.MarkwonView
+ <CustomView.CustomMarkwonView
android:id="@+id/comment_markdown_view_item_post_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml
index babdcdbf..fc48202e 100644
--- a/app/src/main/res/layout/item_post_detail.xml
+++ b/app/src/main/res/layout/item_post_detail.xml
@@ -63,7 +63,7 @@
android:textColor="@color/primaryTextColor"
android:textSize="18sp" />
- <ru.noties.markwon.view.MarkwonView
+ <CustomView.CustomMarkwonView
android:id="@+id/content_markdown_view_item_post_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/app/src/main/res/layout/item_rule.xml b/app/src/main/res/layout/item_rule.xml
new file mode 100644
index 00000000..1124a548
--- /dev/null
+++ b/app/src/main/res/layout/item_rule.xml
@@ -0,0 +1,22 @@
+<?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">
+
+ <TextView
+ android:id="@+id/short_name_text_view_item_rule"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:textColor="@color/primaryTextColor"
+ android:textSize="16sp" />
+
+ <CustomView.CustomMarkwonView
+ android:id="@+id/description_markwon_view_item_rule"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="16dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp" />
+
+</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 d76df6b2..005aa048 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -9,6 +9,7 @@
<string name="post_link_activity_label">Link Post</string>
<string name="post_image_activity_label">Image Post</string>
<string name="post_video_activity_label">Video Post</string>
+ <string name="rules_activity_label">Rules</string>
<string name="navigation_drawer_open">Open navigation drawer</string>
<string name="navigation_drawer_close">Close navigation drawer</string>
@@ -124,4 +125,7 @@
<string name="no_flair">No flair</string>
<string name="error_loading_flairs">Error loading flairs.\nTap to retry.</string>
+
+ <string name="no_rule">No rule</string>
+ <string name="error_loading_rules">Error loading rules.\nTap to retry.</string>
</resources>