Merge pull request #7339 from nextcloud/mediaOverlaps

Fix overlapping seek bar and softkeys
This commit is contained in:
Andy Scherzinger 2020-11-18 17:27:55 +01:00 committed by GitHub
commit f87bd9b03b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,6 +133,7 @@ import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.SearchView;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.view.MenuItemCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@ -646,6 +647,9 @@ public class FileDisplayActivity extends FileActivity
}
updateFragmentsVisibility(false);
updateActionBarTitleAndHomeButton(null);
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) findViewById(R.id.root_layout).getLayoutParams();
params.setBehavior(new AppBarLayout.ScrollingViewBehavior());
}
public void updateListOfFilesFragment(boolean fromSearch) {
@ -2174,6 +2178,9 @@ public class FileDisplayActivity extends FileActivity
}
if (showPreview && file.isDown() && !file.isDownloading() || streamMedia) {
showSortListGroup(false);
CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) findViewById(R.id.root_layout).getLayoutParams();
params.setBehavior(null);
Fragment mediaFragment = PreviewMediaFragment.newInstance(file, user.get(), startPlaybackPosition, autoplay);
setSecondFragment(mediaFragment);
updateFragmentsVisibility(true);