aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java5
-rw-r--r--app/src/main/res/layout/item_reddit_gallery_submission_add_image.xml16
-rw-r--r--app/src/main/res/layout/item_reddit_gallery_submission_image.xml3
3 files changed, 17 insertions, 7 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java
index b81f235b..9184523e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/RedditGallerySubmissionRecyclerViewAdapter.java
@@ -155,8 +155,9 @@ public class RedditGallerySubmissionRecyclerViewAdapter extends RecyclerView.Ada
public AddImageViewHolder(@NonNull View itemView) {
super(itemView);
- itemView.setBackgroundTintList(ColorStateList.valueOf(customThemeWrapper.getColorPrimaryLightTheme()));
- ((FloatingActionButton) itemView).setImageTintList(ColorStateList.valueOf(customThemeWrapper.getFABIconColor()));
+ FloatingActionButton fab = itemView.findViewById(R.id.fab_item_gallery_submission_add_image);
+ fab.setBackgroundTintList(ColorStateList.valueOf(customThemeWrapper.getColorPrimaryLightTheme()));
+ fab.setImageTintList(ColorStateList.valueOf(customThemeWrapper.getFABIconColor()));
itemView.setOnClickListener(view -> itemClickListener.onAddImageClicked());
}
diff --git a/app/src/main/res/layout/item_reddit_gallery_submission_add_image.xml b/app/src/main/res/layout/item_reddit_gallery_submission_add_image.xml
index c9d3478e..a1f55806 100644
--- a/app/src/main/res/layout/item_reddit_gallery_submission_add_image.xml
+++ b/app/src/main/res/layout/item_reddit_gallery_submission_add_image.xml
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
-<com.google.android.material.floatingactionbutton.FloatingActionButton xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_outline_select_photo_24dp" /> \ No newline at end of file
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/fab_item_gallery_submission_add_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:src="@drawable/ic_outline_select_photo_24dp" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_reddit_gallery_submission_image.xml b/app/src/main/res/layout/item_reddit_gallery_submission_image.xml
index e10bb1f1..86eef71b 100644
--- a/app/src/main/res/layout/item_reddit_gallery_submission_image.xml
+++ b/app/src/main/res/layout/item_reddit_gallery_submission_image.xml
@@ -6,7 +6,8 @@
<ml.docilealligator.infinityforreddit.customviews.AspectRatioGifImageView
android:id="@+id/aspect_ratio_gif_image_view_item_reddit_gallery_submission_image"
android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:layout_height="wrap_content"
+ android:scaleType="centerCrop" />
<ProgressBar
android:id="@+id/progress_bar_item_reddit_gallery_submission_image"