aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java37
-rw-r--r--app/src/main/res/layout/item_comment.xml8
-rw-r--r--app/src/main/res/layout/item_post_compact.xml7
-rw-r--r--app/src/main/res/layout/item_post_compact_right_thumbnail.xml7
-rw-r--r--app/src/main/res/layout/item_post_detail_gallery.xml23
-rw-r--r--app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml23
-rw-r--r--app/src/main/res/layout/item_post_detail_link.xml23
-rw-r--r--app/src/main/res/layout/item_post_detail_no_preview_link.xml23
-rw-r--r--app/src/main/res/layout/item_post_detail_text.xml23
-rw-r--r--app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml23
-rw-r--r--app/src/main/res/layout/item_post_detail_video_autoplay.xml23
-rw-r--r--app/src/main/res/layout/item_post_gallery.xml18
-rw-r--r--app/src/main/res/layout/item_post_image_and_gif_autoplay.xml18
-rw-r--r--app/src/main/res/layout/item_post_link.xml18
-rw-r--r--app/src/main/res/layout/item_post_no_preview_link.xml18
-rw-r--r--app/src/main/res/layout/item_post_text.xml18
-rw-r--r--app/src/main/res/layout/item_post_video_and_gif_preview.xml18
-rw-r--r--app/src/main/res/layout/item_post_video_type_autoplay.xml18
19 files changed, 187 insertions, 160 deletions
diff --git a/.gitignore b/.gitignore
index 7bc61541..5614bb96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@ bin/
gen/
out/
/app/release
+/app/minifiedRelease
# Gradle files
.gradle/
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java
index 45e6cc1d..b558db87 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java
@@ -795,7 +795,11 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
if (post.getPostType() != Post.GIF_TYPE && post.getPostType() != Post.VIDEO_TYPE) {
((PostCompactBaseViewHolder) holder).progressBar.setVisibility(View.VISIBLE);
}
- ((PostCompactBaseViewHolder) holder).imageView.setVisibility(View.VISIBLE);
+ if (post.getPostType() == Post.GALLERY_TYPE && post.getPreviewUrl() == null || post.getPreviewUrl().equals("")) {
+ ((PostCompactBaseViewHolder) holder).noPreviewLinkImageFrameLayout.setVisibility(View.VISIBLE);
+ } else {
+ ((PostCompactBaseViewHolder) holder).imageView.setVisibility(View.VISIBLE);
+ }
loadImage(holder, post);
}
@@ -845,6 +849,9 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
((PostCompactBaseViewHolder) holder).linkTextView.setText(noPreviewLinkDomain);
((PostCompactBaseViewHolder) holder).noPreviewLinkImageFrameLayout.setVisibility(View.VISIBLE);
break;
+ case Post.GALLERY_TYPE:
+ ((PostCompactBaseViewHolder) holder).typeTextView.setText(R.string.gallery);
+ break;
case Post.TEXT_TYPE:
((PostCompactBaseViewHolder) holder).typeTextView.setText(R.string.text);
break;
@@ -2547,7 +2554,6 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
ImageView imageView;
ImageView playButtonImageView;
FrameLayout noPreviewLinkImageFrameLayout;
- ImageView noPreviewLinkImageView;
Barrier imageBarrier;
ConstraintLayout bottomConstraintLayout;
ImageView upvoteButton;
@@ -2598,7 +2604,6 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
this.imageView = imageView;
this.playButtonImageView = playButtonImageView;
this.noPreviewLinkImageFrameLayout = noPreviewLinkImageFrameLayout;
- this.noPreviewLinkImageView = noPreviewLinkImageView;
this.imageBarrier = imageBarrier;
this.bottomConstraintLayout = bottomConstraintLayout;
this.upvoteButton = upvoteButton;
@@ -2784,6 +2789,12 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
intent.putExtra(ViewVideoActivity.EXTRA_ID, post.getId());
intent.putExtra(ViewVideoActivity.EXTRA_IS_NSFW, post.isNSFW());
mActivity.startActivity(intent);
+ break;
+ }
+ case Post.GALLERY_TYPE: {
+ Intent intent = new Intent(mActivity, ViewRedditGalleryActivity.class);
+ intent.putExtra(ViewRedditGalleryActivity.EXTRA_REDDIT_GALLERY, post.getGallery());
+ mActivity.startActivity(intent);
}
}
}
@@ -2796,15 +2807,21 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
}
Post post = getItem(position);
if (post != null) {
- Intent intent = new Intent(mActivity, LinkResolverActivity.class);
- Uri uri = Uri.parse(post.getUrl());
- if (uri.getScheme() == null && uri.getHost() == null) {
- intent.setData(LinkResolverActivity.getRedditUriByPath(post.getUrl()));
+ if (post.getPostType() == Post.GALLERY_TYPE) {
+ Intent intent = new Intent(mActivity, ViewRedditGalleryActivity.class);
+ intent.putExtra(ViewRedditGalleryActivity.EXTRA_REDDIT_GALLERY, post.getGallery());
+ mActivity.startActivity(intent);
} else {
- intent.setData(uri);
+ Intent intent = new Intent(mActivity, LinkResolverActivity.class);
+ Uri uri = Uri.parse(post.getUrl());
+ if (uri.getScheme() == null && uri.getHost() == null) {
+ intent.setData(LinkResolverActivity.getRedditUriByPath(post.getUrl()));
+ } else {
+ intent.setData(uri);
+ }
+ intent.putExtra(LinkResolverActivity.EXTRA_IS_NSFW, post.isNSFW());
+ mActivity.startActivity(intent);
}
- intent.putExtra(LinkResolverActivity.EXTRA_IS_NSFW, post.isNSFW());
- mActivity.startActivity(intent);
}
});
diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml
index e2ab9170..8724cda8 100644
--- a/app/src/main/res/layout/item_comment.xml
+++ b/app/src/main/res/layout/item_comment.xml
@@ -32,7 +32,7 @@
<TextView
android:id="@+id/author_text_view_item_post_comment"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:drawablePadding="4dp"
@@ -42,12 +42,12 @@
app:layout_constraintEnd_toStartOf="@+id/barrier"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintWidth_default="wrap"
+ app:layout_constrainedWidth="true"
app:layout_constraintHorizontal_bias="0" />
<TextView
android:id="@+id/author_flair_text_view_item_post_comment"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:fontFamily="?attr/font_family"
@@ -58,7 +58,7 @@
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/author_text_view_item_post_comment"
- app:layout_constraintWidth_default="wrap"
+ app:layout_constrainedWidth="true"
tools:visibility="visible" />
<TextView
diff --git a/app/src/main/res/layout/item_post_compact.xml b/app/src/main/res/layout/item_post_compact.xml
index 1cee1578..a5943b69 100644
--- a/app/src/main/res/layout/item_post_compact.xml
+++ b/app/src/main/res/layout/item_post_compact.xml
@@ -24,7 +24,7 @@
<TextView
android:id="@+id/name_text_view_item_post_compact"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -32,10 +32,12 @@
android:fontFamily="?attr/font_family"
android:textColor="#E91E63"
android:textSize="?attr/font_default"
+ app:layout_constraintHorizontal_bias="0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_compact"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_compact"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_compact"
@@ -45,7 +47,6 @@
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintStart_toEndOf="@id/name_text_view_item_post_compact"
app:layout_constraintTop_toTopOf="parent" />
<TextView
diff --git a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml
index bd5a5e5d..0458c12b 100644
--- a/app/src/main/res/layout/item_post_compact_right_thumbnail.xml
+++ b/app/src/main/res/layout/item_post_compact_right_thumbnail.xml
@@ -24,7 +24,7 @@
<TextView
android:id="@+id/name_text_view_item_post_compact_right_thumbnail"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -35,7 +35,9 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_compact_right_thumbnail"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_compact_right_thumbnail"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_compact_right_thumbnail"
@@ -45,7 +47,6 @@
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintStart_toEndOf="@id/name_text_view_item_post_compact_right_thumbnail"
app:layout_constraintTop_toTopOf="parent" />
<TextView
diff --git a/app/src/main/res/layout/item_post_detail_gallery.xml b/app/src/main/res/layout/item_post_detail_gallery.xml
index 8d2a9ce2..1de319c2 100644
--- a/app/src/main/res/layout/item_post_detail_gallery.xml
+++ b/app/src/main/res/layout/item_post_detail_gallery.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/cardViewBackgroundColor">
@@ -22,51 +23,49 @@
<TextView
android:id="@+id/subreddit_text_view_item_post_detail_gallery"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/user_text_view_item_post_detail_gallery"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_gallery"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_gallery"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/author_flair_text_view_item_post_detail_gallery"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_12"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_gallery"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_detail_gallery"
diff --git a/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml
index ecf7cf38..add4082f 100644
--- a/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml
+++ b/app/src/main/res/layout/item_post_detail_image_and_gif_autoplay.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/cardViewBackgroundColor">
@@ -22,51 +23,49 @@
<TextView
android:id="@+id/subreddit_text_view_item_post_detail_image_and_gif_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_image_and_gif_autoplay"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/user_text_view_item_post_detail_image_and_gif_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_image_and_gif_autoplay"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_image_and_gif_autoplay"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_image_and_gif_autoplay"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/author_flair_text_view_item_post_detail_image_and_gif_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_12"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_image_and_gif_autoplay"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_image_and_gif_autoplay"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_detail_image_and_gif_autoplay"
diff --git a/app/src/main/res/layout/item_post_detail_link.xml b/app/src/main/res/layout/item_post_detail_link.xml
index a0868b07..27a3f407 100644
--- a/app/src/main/res/layout/item_post_detail_link.xml
+++ b/app/src/main/res/layout/item_post_detail_link.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/cardViewBackgroundColor">
@@ -22,51 +23,49 @@
<TextView
android:id="@+id/subreddit_text_view_item_post_detail_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_link"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/user_text_view_item_post_detail_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_link"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_link"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_link"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/author_flair_text_view_item_post_detail_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_12"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_link"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_link"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_detail_link"
diff --git a/app/src/main/res/layout/item_post_detail_no_preview_link.xml b/app/src/main/res/layout/item_post_detail_no_preview_link.xml
index 9eefa30e..99f5ad0b 100644
--- a/app/src/main/res/layout/item_post_detail_no_preview_link.xml
+++ b/app/src/main/res/layout/item_post_detail_no_preview_link.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/cardViewBackgroundColor">
@@ -22,51 +23,49 @@
<TextView
android:id="@+id/subreddit_text_view_item_post_detail_no_preview_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview_link"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/user_text_view_item_post_detail_no_preview_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_no_preview_link"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview_link"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_no_preview_link"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"/>
<TextView
android:id="@+id/author_flair_text_view_item_post_detail_no_preview_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_12"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_no_preview_link"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_no_preview_link"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_detail_no_preview_link"
diff --git a/app/src/main/res/layout/item_post_detail_text.xml b/app/src/main/res/layout/item_post_detail_text.xml
index 7828687d..590d4c87 100644
--- a/app/src/main/res/layout/item_post_detail_text.xml
+++ b/app/src/main/res/layout/item_post_detail_text.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/cardViewBackgroundColor">
@@ -22,51 +23,49 @@
<TextView
android:id="@+id/subreddit_text_view_item_post_detail_text"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_text"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/user_text_view_item_post_detail_text"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_text"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_text"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_text"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/author_flair_text_view_item_post_detail_text"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_12"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_text"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_text"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_detail_text"
diff --git a/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml
index 83fb172a..7334e1d8 100644
--- a/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml
+++ b/app/src/main/res/layout/item_post_detail_video_and_gif_preview.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/cardViewBackgroundColor">
@@ -22,51 +23,49 @@
<TextView
android:id="@+id/subreddit_text_view_item_post_detail_video_and_gif_preview"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_and_gif_preview"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/user_text_view_item_post_detail_video_and_gif_preview"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_video_and_gif_preview"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_and_gif_preview"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_video_and_gif_preview"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/author_flair_text_view_item_post_detail_video_and_gif_preview"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_12"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_and_gif_preview"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_video_and_gif_preview"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_detail_video_and_gif_preview"
diff --git a/app/src/main/res/layout/item_post_detail_video_autoplay.xml b/app/src/main/res/layout/item_post_detail_video_autoplay.xml
index 9d8e8590..200562ad 100644
--- a/app/src/main/res/layout/item_post_detail_video_autoplay.xml
+++ b/app/src/main/res/layout/item_post_detail_video_autoplay.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:background="?attr/cardViewBackgroundColor">
@@ -22,51 +23,49 @@
<TextView
android:id="@+id/subreddit_text_view_item_post_detail_video_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_autoplay"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/user_text_view_item_post_detail_video_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_video_autoplay"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_autoplay"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_video_autoplay"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<TextView
android:id="@+id/author_flair_text_view_item_post_detail_video_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_12"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_video_autoplay"
app:layout_constraintEnd_toStartOf="@id/guideline"
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_video_autoplay"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_detail_video_autoplay"
diff --git a/app/src/main/res/layout/item_post_gallery.xml b/app/src/main/res/layout/item_post_gallery.xml
index 5b15c117..de750751 100644
--- a/app/src/main/res/layout/item_post_gallery.xml
+++ b/app/src/main/res/layout/item_post_gallery.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/card_view_item_post_gallery_type"
@@ -31,7 +32,7 @@
<TextView
android:id="@+id/subreddit_name_text_view_item_post_gallery_type"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -41,23 +42,24 @@
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_gallery_type"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_gallery_type"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_gallery_type"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0"/>
<TextView
android:id="@+id/user_text_view_item_post_gallery_type"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_gallery_type"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_gallery_type"
app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_item_post_gallery_type"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_gallery_type"
@@ -66,9 +68,9 @@
android:layout_marginEnd="8dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_item_post_gallery_type"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_gallery_type"
diff --git a/app/src/main/res/layout/item_post_image_and_gif_autoplay.xml b/app/src/main/res/layout/item_post_image_and_gif_autoplay.xml
index 561200b1..3a5ce08b 100644
--- a/app/src/main/res/layout/item_post_image_and_gif_autoplay.xml
+++ b/app/src/main/res/layout/item_post_image_and_gif_autoplay.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/card_view_item_post_image_and_gif_autoplay"
@@ -31,7 +32,7 @@
<TextView
android:id="@+id/subreddit_name_text_view_item_post_image_and_gif_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -41,23 +42,24 @@
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_image_and_gif_autoplay"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_image_and_gif_autoplay"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_image_and_gif_autoplay"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0" />
<TextView
android:id="@+id/user_text_view_item_post_image_and_gif_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_image_and_gif_autoplay"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_image_and_gif_autoplay"
app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_item_post_image_and_gif_autoplay"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_image_and_gif_autoplay"
@@ -66,9 +68,9 @@
android:layout_marginEnd="8dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_item_post_image_and_gif_autoplay"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_image_and_gif_autoplay"
diff --git a/app/src/main/res/layout/item_post_link.xml b/app/src/main/res/layout/item_post_link.xml
index e2ff7250..974668d7 100644
--- a/app/src/main/res/layout/item_post_link.xml
+++ b/app/src/main/res/layout/item_post_link.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/card_view_item_post_link"
@@ -31,7 +32,7 @@
<TextView
android:id="@+id/subreddit_name_text_view_item_post_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -41,23 +42,24 @@
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_link"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_link"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_link"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0" />
<TextView
android:id="@+id/user_text_view_item_post_link"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_link"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_link"
app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_item_post_link"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_link"
@@ -66,9 +68,9 @@
android:layout_marginEnd="8dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_item_post_link"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_link"
diff --git a/app/src/main/res/layout/item_post_no_preview_link.xml b/app/src/main/res/layout/item_post_no_preview_link.xml
index 39396df9..c7d6861b 100644
--- a/app/src/main/res/layout/item_post_no_preview_link.xml
+++ b/app/src/main/res/layout/item_post_no_preview_link.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/card_view_item_post_no_preview_link_type"
@@ -31,7 +32,7 @@
<TextView
android:id="@+id/subreddit_name_text_view_item_post_no_preview_link_type"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -41,23 +42,24 @@
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_no_preview_link_type"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_no_preview_link_type"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_no_preview_link_type"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0" />
<TextView
android:id="@+id/user_text_view_item_post_no_preview_link_type"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_no_preview_link_type"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_no_preview_link_type"
app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_item_post_no_preview_link_type"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_no_preview_link_type"
@@ -66,9 +68,9 @@
android:layout_marginEnd="8dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_item_post_no_preview_link_type"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_no_preview_link_type"
diff --git a/app/src/main/res/layout/item_post_text.xml b/app/src/main/res/layout/item_post_text.xml
index c79fd6fc..e7d1867b 100644
--- a/app/src/main/res/layout/item_post_text.xml
+++ b/app/src/main/res/layout/item_post_text.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/card_view_item_post_text_type"
@@ -31,7 +32,7 @@
<TextView
android:id="@+id/subreddit_name_text_view_item_post_text_type"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -41,23 +42,24 @@
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_text_type"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_text_type"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_text_type"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0" />
<TextView
android:id="@+id/user_text_view_item_post_text_type"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_text_type"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_text_type"
app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_item_post_text_type"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_text_type"
@@ -66,9 +68,9 @@
android:layout_marginEnd="8dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_item_post_text_type"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_text_type"
diff --git a/app/src/main/res/layout/item_post_video_and_gif_preview.xml b/app/src/main/res/layout/item_post_video_and_gif_preview.xml
index 738f1edf..7478afbf 100644
--- a/app/src/main/res/layout/item_post_video_and_gif_preview.xml
+++ b/app/src/main/res/layout/item_post_video_and_gif_preview.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/card_view_item_post_video_and_gif_preview"
@@ -31,7 +32,7 @@
<TextView
android:id="@+id/subreddit_name_text_view_item_post_video_and_gif_preview"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -41,23 +42,24 @@
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_video_and_gif_preview"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_video_and_gif_preview"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_video_and_gif_preview"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0" />
<TextView
android:id="@+id/user_text_view_item_post_video_and_gif_preview"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_video_and_gif_preview"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_video_and_gif_preview"
app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_item_post_video_and_gif_preview"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_video_and_gif_preview"
@@ -66,9 +68,9 @@
android:layout_marginEnd="8dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_item_post_video_and_gif_preview"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_video_and_gif_preview"
diff --git a/app/src/main/res/layout/item_post_video_type_autoplay.xml b/app/src/main/res/layout/item_post_video_type_autoplay.xml
index 6f0648b9..dd404645 100644
--- a/app/src/main/res/layout/item_post_video_type_autoplay.xml
+++ b/app/src/main/res/layout/item_post_video_type_autoplay.xml
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:id="@+id/card_view_item_post_video_type_autoplay"
@@ -31,7 +32,7 @@
<TextView
android:id="@+id/subreddit_name_text_view_item_post_video_type_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="16dp"
@@ -41,23 +42,24 @@
app:layout_constraintBottom_toTopOf="@id/user_text_view_item_post_video_type_autoplay"
app:layout_constraintStart_toEndOf="@id/icon_gif_image_view_item_post_video_type_autoplay"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_video_type_autoplay"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constrainedWidth="true"
+ app:layout_constraintHorizontal_bias="0" />
<TextView
android:id="@+id/user_text_view_item_post_video_type_autoplay"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
- android:maxLines="2"
- android:ellipsize="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_video_type_autoplay"
app:layout_constraintEnd_toStartOf="@id/stickied_post_image_view_item_post_video_type_autoplay"
app:layout_constraintTop_toBottomOf="@+id/subreddit_name_text_view_item_post_video_type_autoplay"
- app:layout_constraintHorizontal_bias="0" />
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constrainedWidth="true" />
<ImageView
android:id="@+id/stickied_post_image_view_item_post_video_type_autoplay"
@@ -66,9 +68,9 @@
android:layout_marginEnd="8dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/subreddit_name_text_view_item_post_video_type_autoplay"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
- app:layout_constraintTop_toTopOf="parent"/>
+ app:layout_constraintTop_toTopOf="parent"
+ tools:visibility="visible" />
<TextView
android:id="@+id/post_time_text_view_item_post_video_type_autoplay"