From 25d8d901ade3d990310a1abfa676238fe6689f2b Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Fri, 16 Jul 2021 08:56:47 +0800 Subject: Small changes in RedditGallerySubmissionRecyclerViewAdapter's UI. --- .../RedditGallerySubmissionRecyclerViewAdapter.java | 5 +++-- .../layout/item_reddit_gallery_submission_add_image.xml | 16 ++++++++++++---- .../res/layout/item_reddit_gallery_submission_image.xml | 3 ++- 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'app') 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 @@ - \ No newline at end of file + + + + + \ 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 @@ + android:layout_height="wrap_content" + android:scaleType="centerCrop" />