mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Merge pull request #10133 from nextcloud/fix/more-scrolling-bugs
Fix contents cut off when scrolling is locked
This commit is contained in:
commit
3c97b4b619
2 changed files with 1 additions and 9 deletions
|
@ -1546,14 +1546,10 @@ public class FileDisplayActivity extends FileActivity
|
|||
*/
|
||||
@VisibleForTesting
|
||||
public void lockScrolling() {
|
||||
final CoordinatorLayout.LayoutParams coordinatorParams = (CoordinatorLayout.LayoutParams) binding.rootLayout.getLayoutParams();
|
||||
coordinatorParams.setBehavior(null);
|
||||
binding.rootLayout.setLayoutParams(coordinatorParams);
|
||||
binding.rootLayout.setNestedScrollingEnabled(false);
|
||||
binding.appbar.appbar.setExpanded(true, false);
|
||||
final AppBarLayout.LayoutParams appbarParams = (AppBarLayout.LayoutParams) binding.appbar.toolbarFrame.getLayoutParams();
|
||||
appbarParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL);
|
||||
binding.appbar.toolbarFrame.setLayoutParams(appbarParams);
|
||||
binding.appbar.appbar.setExpanded(true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1561,9 +1557,6 @@ public class FileDisplayActivity extends FileActivity
|
|||
*/
|
||||
@VisibleForTesting
|
||||
public void resetScrolling() {
|
||||
final CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) binding.rootLayout.getLayoutParams();
|
||||
params.setBehavior(new AppBarLayout.ScrollingViewBehavior());
|
||||
binding.rootLayout.setLayoutParams(params);
|
||||
AppBarLayout.LayoutParams appbarParams = (AppBarLayout.LayoutParams) binding.appbar.toolbarFrame.getLayoutParams();
|
||||
appbarParams.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS);
|
||||
binding.appbar.toolbarFrame.setLayoutParams(appbarParams);
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
tools:context=".ui.preview.PreviewMediaFragment">
|
||||
|
||||
<ImageView
|
||||
|
|
Loading…
Reference in a new issue