Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Bottom Navigation Bar From File Details #14343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import com.nextcloud.ui.ChooseAccountDialogFragment;
import com.nextcloud.ui.composeActivity.ComposeActivity;
import com.nextcloud.ui.composeActivity.ComposeDestination;
import com.nextcloud.utils.extensions.ViewExtensionsKt;
import com.nextcloud.utils.mdm.MDMConfig;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
Expand Down Expand Up @@ -1373,4 +1374,8 @@ private void handleNavItemClickEvent(@IdRes int menuItemId) {
Menu navMenu = drawerNavigationView.getMenu();
onNavigationItemClicked(navMenu.findItem(menuItemId));
}

public void showBottomNavigationBar(boolean show) {
ViewExtensionsKt.setVisibleIf(bottomNavigationView, show);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import com.owncloud.android.lib.resources.files.ToggleFavoriteRemoteOperation;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.ui.activity.DrawerActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.ToolbarActivity;
import com.owncloud.android.ui.adapter.FileDetailTabAdapter;
Expand Down Expand Up @@ -209,6 +210,10 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
throw new IllegalArgumentException("Arguments may not be null");
}

if (getActivity() instanceof DrawerActivity drawerActivity) {
drawerActivity.showBottomNavigationBar(false);
}

setFile(BundleExtensionsKt.getParcelableArgument(arguments, ARG_FILE, OCFile.class));
parentFolder = BundleExtensionsKt.getParcelableArgument(arguments, ARG_PARENT_FOLDER, OCFile.class);
user = BundleExtensionsKt.getParcelableArgument(arguments, ARG_USER, User.class);
Expand Down Expand Up @@ -268,6 +273,14 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
}
}

@Override
public void onDestroy() {
if (getActivity() instanceof DrawerActivity drawerActivity) {
drawerActivity.showBottomNavigationBar(true);
}
super.onDestroy();
}

private void onOverflowIconClicked() {
final OCFile file = getFile();
final List<Integer> additionalFilter = new ArrayList<>(
Expand Down
Loading