aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-07-16 00:56:47 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-07-16 00:56:47 +0000
commit25d8d901ade3d990310a1abfa676238fe6689f2b (patch)
tree0ee1cee7b483809f3a754772337b42bd1c623bd3 /app/src
parenta610be7d16316a17d4c6910027d135ceda09f2ed (diff)
downloadinfinity-for-reddit-25d8d901ade3d990310a1abfa676238fe6689f2b.tar
infinity-for-reddit-25d8d901ade3d990310a1abfa676238fe6689f2b.tar.gz
infinity-for-reddit-25d8d901ade3d990310a1abfa676238fe6689f2b.tar.bz2
infinity-for-reddit-25d8d901ade3d990310a1abfa676238fe6689f2b.tar.lz
infinity-for-reddit-25d8d901ade3d990310a1abfa676238fe6689f2b.tar.xz
infinity-for-reddit-25d8d901ade3d990310a1abfa676238fe6689f2b.tar.zst
infinity-for-reddit-25d8d901ade3d990310a1abfa676238fe6689f2b.zip
Small changes in RedditGallerySubmissionRecyclerViewAdapter's UI.
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"