diff --git a/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java b/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java index 039a72534a..a899ce19cf 100644 --- a/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -48,7 +48,6 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewTreeObserver; import android.view.WindowManager; -import android.widget.Toast; import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.snackbar.Snackbar; @@ -1124,6 +1123,8 @@ public class FileDisplayActivity extends FileActivity createMinFragments(null); } else { // pop back + ((CoordinatorLayout.LayoutParams) binding.rootLayout.getLayoutParams()) + .setBehavior(new AppBarLayout.ScrollingViewBehavior()); hideSearchView(getCurrentDir()); showSortListGroup(true); super.onBackPressed(); @@ -2187,6 +2188,7 @@ public class FileDisplayActivity extends FileActivity Fragment mediaFragment = PreviewMediaFragment.newInstance(file, user.get(), startPlaybackPosition, autoplay); setLeftFragment(mediaFragment); binding.rightFragmentContainer.setVisibility(View.GONE); + ((CoordinatorLayout.LayoutParams) binding.rootLayout.getLayoutParams()).setBehavior(null); super.updateActionBarTitleAndHomeButton(file); } else { Intent previewIntent = new Intent(); diff --git a/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java b/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java index 517959aee7..2a5916f072 100644 --- a/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java +++ b/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java @@ -178,6 +178,8 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene emptyListView = binding.emptyView.emptyListView; + getActivity().findViewById(R.id.sort_list_button_group).setVisibility(View.GONE); + setLoadingView(); return view; } diff --git a/src/main/res/layout/fragment_preview_media.xml b/src/main/res/layout/fragment_preview_media.xml index 47bbb85e4e..7c8adb9fd8 100644 --- a/src/main/res/layout/fragment_preview_media.xml +++ b/src/main/res/layout/fragment_preview_media.xml @@ -26,6 +26,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" + android:layout_marginTop="?attr/actionBarSize" tools:context=".ui.preview.PreviewMediaFragment">