aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-03-30 23:20:34 +0000
committerDocile-Alligator <25734209+Docile-Alligator@users.noreply.github.com>2024-03-30 23:20:34 +0000
commit8ed6cc88d400aff27eb9522faf8dcd925a308de7 (patch)
treec7d8178f23fdaa6cfef76f984c47aef2c9e3a991 /app
parent52eb5cb37663e79d96fb4eab7e49ada4a273d3dc (diff)
downloadinfinity-for-reddit-8ed6cc88d400aff27eb9522faf8dcd925a308de7.tar
infinity-for-reddit-8ed6cc88d400aff27eb9522faf8dcd925a308de7.tar.gz
infinity-for-reddit-8ed6cc88d400aff27eb9522faf8dcd925a308de7.tar.bz2
infinity-for-reddit-8ed6cc88d400aff27eb9522faf8dcd925a308de7.tar.lz
infinity-for-reddit-8ed6cc88d400aff27eb9522faf8dcd925a308de7.tar.xz
infinity-for-reddit-8ed6cc88d400aff27eb9522faf8dcd925a308de7.tar.zst
infinity-for-reddit-8ed6cc88d400aff27eb9522faf8dcd925a308de7.zip
Fix UploadedImagesBottomSheetFragment not scrolling.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UploadedImagesBottomSheetFragment.java2
-rw-r--r--app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml103
2 files changed, 57 insertions, 48 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UploadedImagesBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UploadedImagesBottomSheetFragment.java
index 0acbd12c..f2288bf9 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UploadedImagesBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UploadedImagesBottomSheetFragment.java
@@ -33,6 +33,8 @@ public class UploadedImagesBottomSheetFragment extends LandscapeExpandedRoundedB
// Inflate the layout for this fragment
FragmentUploadedImagesBottomSheetBinding binding = FragmentUploadedImagesBottomSheetBinding.inflate(inflater, container, false);
+ binding.getRoot().setNestedScrollingEnabled(true);
+
binding.uploadButtonUploadedImagesBottomSheetFragment.setOnClickListener(view -> {
activity.uploadImage();
dismiss();
diff --git a/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml b/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml
index 8c846541..bd91f057 100644
--- a/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml
+++ b/app/src/main/res/layout/fragment_uploaded_images_bottom_sheet.xml
@@ -1,65 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
- android:orientation="vertical"
tools:context=".bottomsheetfragments.UploadedImagesBottomSheetFragment">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:paddingTop="16dp"
- android:paddingStart="16dp"
- android:paddingEnd="16dp"
- android:text="@string/uploaded_images"
- android:fontFamily="?attr/font_family"
- android:textSize="?attr/font_18"
- android:textColor="?attr/primaryTextColor" />
-
- <TextView
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="16dp"
- android:paddingStart="16dp"
- android:paddingEnd="16dp"
- android:text="@string/uploaded_images_explanation"
- android:fontFamily="?attr/font_family"
- android:textSize="?attr/font_default"
- android:textColor="?attr/secondaryTextColor" />
+ android:orientation="vertical">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:paddingTop="16dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:text="@string/uploaded_images"
+ android:fontFamily="?attr/font_family"
+ android:textSize="?attr/font_18"
+ android:textColor="?attr/primaryTextColor" />
- <com.google.android.material.button.MaterialButton
- android:id="@+id/capture_button_uploaded_images_bottom_sheet_fragment"
- android:layout_width="0dp"
+ <TextView
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_margin="16dp"
- android:backgroundTint="@color/colorPrimary"
- android:textColor="#FFFFFF"
- android:text="@string/capture" />
+ android:paddingTop="16dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="16dp"
+ android:text="@string/uploaded_images_explanation"
+ android:fontFamily="?attr/font_family"
+ android:textSize="?attr/font_default"
+ android:textColor="?attr/secondaryTextColor" />
- <com.google.android.material.button.MaterialButton
- android:id="@+id/upload_button_uploaded_images_bottom_sheet_fragment"
- android:layout_width="0dp"
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/capture_button_uploaded_images_bottom_sheet_fragment"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_margin="16dp"
+ android:backgroundTint="@color/colorPrimary"
+ android:textColor="#FFFFFF"
+ android:text="@string/capture" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/upload_button_uploaded_images_bottom_sheet_fragment"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_margin="16dp"
+ android:backgroundTint="@color/colorPrimary"
+ android:textColor="#FFFFFF"
+ android:text="@string/select_image" />
+
+ </LinearLayout>
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_uploaded_images_bottom_sheet"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_margin="16dp"
- android:backgroundTint="@color/colorPrimary"
- android:textColor="#FFFFFF"
- android:text="@string/select_image" />
+ app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+ android:nestedScrollingEnabled="false" />
</LinearLayout>
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/recycler_view_uploaded_images_bottom_sheet"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
-
-</LinearLayout> \ No newline at end of file
+</ScrollView> \ No newline at end of file