From 9fa4ba126b78bcf9c8df15b1286c4cb0a0225199 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Sun, 8 Oct 2017 17:36:35 -0700 Subject: [PATCH] Fix non-collapsing layout when scrolled from horiz recyclerview Fixes #7042 // FREEBIE --- res/layout/recipient_preference_activity.xml | 1 + res/layout/recipient_preference_photo_rail.xml | 2 +- .../thoughtcrime/securesms/components/ThreadPhotoRailView.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/res/layout/recipient_preference_activity.xml b/res/layout/recipient_preference_activity.xml index 46e2f451ab..ef394ee8b1 100644 --- a/res/layout/recipient_preference_activity.xml +++ b/res/layout/recipient_preference_activity.xml @@ -75,6 +75,7 @@ android:padding="16dp" android:text="@string/recipient_preference_activity__shared_media" android:visibility="gone" + android:focusableInTouchMode="true" style="?android:attr/preferenceCategoryStyle" android:textColor="@color/textsecure_primary"/> diff --git a/res/layout/recipient_preference_photo_rail.xml b/res/layout/recipient_preference_photo_rail.xml index bb3f365f58..92866c2056 100644 --- a/res/layout/recipient_preference_photo_rail.xml +++ b/res/layout/recipient_preference_photo_rail.xml @@ -8,6 +8,6 @@ android:paddingLeft="16dp" android:paddingStart="16dp" android:clipToPadding="false" - android:nestedScrollingEnabled="true" + android:nestedScrollingEnabled="false" android:scrollbars="none"/> \ No newline at end of file diff --git a/src/org/thoughtcrime/securesms/components/ThreadPhotoRailView.java b/src/org/thoughtcrime/securesms/components/ThreadPhotoRailView.java index c1801c5785..35f9f02fb9 100644 --- a/src/org/thoughtcrime/securesms/components/ThreadPhotoRailView.java +++ b/src/org/thoughtcrime/securesms/components/ThreadPhotoRailView.java @@ -51,7 +51,7 @@ public class ThreadPhotoRailView extends FrameLayout { this.recyclerView = ViewUtil.findById(this, R.id.photo_list); this.recyclerView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)); this.recyclerView.setItemAnimator(new DefaultItemAnimator()); - this.recyclerView.setNestedScrollingEnabled(true); + this.recyclerView.setNestedScrollingEnabled(false); } public void setListener(@Nullable OnItemClickedListener listener) {