mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 02:38:58 +03:00
When going into subfolder or show details: show header even if it was scrolled away
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
c981833bc1
commit
376ad933fb
1 changed files with 15 additions and 1 deletions
|
@ -44,6 +44,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.AbsListView;
|
||||
import android.widget.PopupMenu;
|
||||
|
||||
import com.google.android.material.appbar.AppBarLayout;
|
||||
import com.google.android.material.behavior.HideBottomViewOnScrollBehavior;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
@ -902,11 +903,13 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
int position = mAdapter.getItemPosition(file);
|
||||
|
||||
if (file.isFolder()) {
|
||||
resetHeaderScrollingState();
|
||||
|
||||
if (file.isEncrypted()) {
|
||||
// check if API >= 19
|
||||
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.KITKAT) {
|
||||
Snackbar.make(getRecyclerView(), R.string.end_to_end_encryption_not_supported,
|
||||
Snackbar.LENGTH_LONG).show();
|
||||
Snackbar.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1115,6 +1118,9 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
if (mActiveActionMode != null) {
|
||||
mActiveActionMode.finish();
|
||||
}
|
||||
|
||||
resetHeaderScrollingState();
|
||||
|
||||
mContainerActivity.showDetails(singleFile);
|
||||
setFabVisible(false);
|
||||
mContainerActivity.showSortListGroup(false);
|
||||
|
@ -1851,4 +1857,12 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void resetHeaderScrollingState() {
|
||||
AppBarLayout appBarLayout = ((FileDisplayActivity) requireActivity()).findViewById(R.id.appbar);
|
||||
|
||||
if (appBarLayout != null) {
|
||||
appBarLayout.setExpanded(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue