aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2019-01-09 02:05:20 +0000
committerAlex Ning <chineseperson5@gmail.com>2019-01-09 02:05:20 +0000
commitf0b149ce82cf11df1f5cf84c7d644e5e670ad0b2 (patch)
treee75272ac86da929a6b2e6c0939dc040eaa242bed /app/src/main/res/layout
parent38be0ba01f6dd08c0be1a830e0d0389405949a56 (diff)
downloadinfinity-for-reddit-f0b149ce82cf11df1f5cf84c7d644e5e670ad0b2.tar
infinity-for-reddit-f0b149ce82cf11df1f5cf84c7d644e5e670ad0b2.tar.gz
infinity-for-reddit-f0b149ce82cf11df1f5cf84c7d644e5e670ad0b2.tar.bz2
infinity-for-reddit-f0b149ce82cf11df1f5cf84c7d644e5e670ad0b2.tar.lz
infinity-for-reddit-f0b149ce82cf11df1f5cf84c7d644e5e670ad0b2.tar.xz
infinity-for-reddit-f0b149ce82cf11df1f5cf84c7d644e5e670ad0b2.tar.zst
infinity-for-reddit-f0b149ce82cf11df1f5cf84c7d644e5e670ad0b2.zip
Use MarkwonView (a markdown library) instead of HtmlTextView to display post content and comments.
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/activity_view_post_detail.xml7
-rw-r--r--app/src/main/res/layout/activity_view_subreddit_detail.xml18
-rw-r--r--app/src/main/res/layout/item_post_comment.xml7
3 files changed, 10 insertions, 22 deletions
diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml
index 5880a9d3..bb2bd0e2 100644
--- a/app/src/main/res/layout/activity_view_post_detail.xml
+++ b/app/src/main/res/layout/activity_view_post_detail.xml
@@ -70,16 +70,13 @@
android:textColor="#000000"
android:textSize="18sp" />
- <org.sufficientlysecure.htmltextview.HtmlTextView
- android:id="@+id/content_html_text_view_view_post_detail"
+ <ru.noties.markwon.view.MarkwonView
+ android:id="@+id/content_markdown_view_view_post_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
- android:textAppearance="@android:style/TextAppearance.Small"
android:visibility="gone" />
<RelativeLayout
diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml
index 97aad464..6492e140 100644
--- a/app/src/main/res/layout/activity_view_subreddit_detail.xml
+++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml
@@ -29,7 +29,8 @@
android:id="@+id/banner_image_view_view_subreddit_detail_activity"
android:layout_width="match_parent"
android:scaleType="centerCrop"
- android:layout_height="180dp" />
+ android:layout_height="180dp"
+ android:contentDescription="@string/content_description_banner_imageview" />
<com.felipecsl.gifimageview.library.GifImageView
android:id="@+id/icon_gif_image_view_view_subreddit_detail_activity"
@@ -58,6 +59,7 @@
android:id="@+id/subreddit_name_text_view_view_subreddit_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:textSize="18sp"
android:textColor="@color/colorAccent"
@@ -70,17 +72,6 @@
android:textColor="@android:color/white"
android:layout_gravity="center_horizontal"/>
- <!--<RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="48dp"
- android:layout_marginStart="16dp"
- android:layout_marginEnd="16dp">
-
-
-
- </RelativeLayout>-->
-
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -91,6 +82,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
+ android:layout_alignParentStart="true"
+ android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity"
android:layout_marginBottom="16dp"/>
<TextView
@@ -98,7 +91,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
- android:layout_toStartOf="@id/subscriber_count_text_view_view_subreddit_detail_activity"
android:textColor="@android:color/black" />
</RelativeLayout>
diff --git a/app/src/main/res/layout/item_post_comment.xml b/app/src/main/res/layout/item_post_comment.xml
index 6981b955..e047d214 100644
--- a/app/src/main/res/layout/item_post_comment.xml
+++ b/app/src/main/res/layout/item_post_comment.xml
@@ -40,15 +40,14 @@
</LinearLayout>
- <org.sufficientlysecure.htmltextview.HtmlTextView
- android:id="@+id/comment_html_text_view_item_post_comment"
+ <ru.noties.markwon.view.MarkwonView
+ android:id="@+id/comment_markdown_view_item_post_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
- android:layout_marginBottom="8dp"
- android:textAppearance="@android:style/TextAppearance.Small"/>
+ android:layout_marginBottom="8dp"/>
<RelativeLayout
android:id="@+id/relative_layout_item_post_comment"