aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-02-13 16:11:02 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-02-13 16:11:02 +0000
commit3fab4fd90d81a7f3e6012c0042135ff6dc5459cd (patch)
tree37e491711a3382a1f04d95915c79a2415d4eee92 /app/src/main/res
parent9d242f973b3a69694b5ae35a6e3e2ba763203f01 (diff)
downloadinfinity-for-reddit-3fab4fd90d81a7f3e6012c0042135ff6dc5459cd.tar
infinity-for-reddit-3fab4fd90d81a7f3e6012c0042135ff6dc5459cd.tar.gz
infinity-for-reddit-3fab4fd90d81a7f3e6012c0042135ff6dc5459cd.tar.bz2
infinity-for-reddit-3fab4fd90d81a7f3e6012c0042135ff6dc5459cd.tar.lz
infinity-for-reddit-3fab4fd90d81a7f3e6012c0042135ff6dc5459cd.tar.xz
infinity-for-reddit-3fab4fd90d81a7f3e6012c0042135ff6dc5459cd.tar.zst
infinity-for-reddit-3fab4fd90d81a7f3e6012c0042135ff6dc5459cd.zip
Start adding Gallery Layout.
Diffstat (limited to '')
-rw-r--r--app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml16
-rw-r--r--app/src/main/res/layout/item_post_gallery.xml67
-rw-r--r--app/src/main/res/values/strings.xml1
3 files changed, 84 insertions, 0 deletions
diff --git a/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml
index 6b577e7c..760a5ea3 100644
--- a/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml
+++ b/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml
@@ -44,6 +44,22 @@
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
+ <TextView
+ android:id="@+id/gallery_layout_text_view_post_layout_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackground"
+ android:clickable="true"
+ android:focusable="true"
+ android:paddingStart="32dp"
+ android:paddingTop="16dp"
+ android:paddingEnd="32dp"
+ android:paddingBottom="16dp"
+ android:text="@string/post_layout_gallery"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" />
+
</LinearLayout>
</androidx.core.widget.NestedScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_post_gallery.xml b/app/src/main/res/layout/item_post_gallery.xml
new file mode 100644
index 00000000..82e4ec60
--- /dev/null
+++ b/app/src/main/res/layout/item_post_gallery.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+ <ProgressBar
+ android:id="@+id/progress_bar_item_post_gallery"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:visibility="gone" />
+
+ <ImageView
+ android:id="@+id/video_or_gif_indicator_image_view_item_post_gallery"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dp"
+ android:layout_gravity="start"
+ android:background="@drawable/play_button_round_background"
+ android:src="@drawable/ic_play_circle_36dp"
+ android:visibility="gone" />
+
+ <RelativeLayout
+ android:id="@+id/load_image_error_relative_layout_item_post_gallery"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_gravity="center"
+ android:visibility="gone">
+
+ <TextView
+ android:id="@+id/load_image_error_text_view_item_gallery"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:drawableTopCompat="@drawable/ic_error_outline_black_24dp"
+ android:layout_gravity="center"
+ android:gravity="center"
+ android:text="@string/error_loading_image_tap_to_retry"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" />
+
+ </RelativeLayout>
+
+ <ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView
+ android:id="@+id/image_view_item_post_gallery"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone" />
+
+ <ImageView
+ android:id="@+id/image_view_no_preview_item_post_gallery"
+ android:layout_width="match_parent"
+ android:layout_height="150dp"
+ android:scaleType="center"
+ android:visibility="gone" />
+
+ <TextView
+ android:id="@+id/title_text_view_item_post_gallery"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:textSize="?attr/title_font_18"
+ android:fontFamily="?attr/title_font_family"
+ android:visibility="gone" />
+
+</FrameLayout> \ 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 e965361a..0f073b9b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -566,6 +566,7 @@
<string name="post_layout_card">Card Layout</string>
<string name="post_layout_compact">Compact Layout</string>
+ <string name="post_layout_gallery">Gallery Layout</string>
<string name="elapsed_time_just_now">Just Now</string>
<string name="elapsed_time_a_minute_ago">1 Minute</string>