BottomNavigationView that opens detail in full screen

315 views Asked by At

I'd like to build an app that has what I understand top be a three top level screen hierarchy like this:

enter image description here

That is, Master screen displays different sections with different content, comprised of items that can be articles (green) or videos (blue).

Clicking on an article (in any of the sections) would take you to a detail screen (top right, in yellow) that should maximize reading area, with a topbar with a back/close button, and covering the bottomnavigationview. Going back (or up) takes you again to the screen with bottomnavigationview.

Clicking on a video would launch a different detail page in which the video can be dragged to the bottom as shown in bottom left screen, so you can still operate with the master list of items (or whatever lies beneath).

Either clicking on an article item (green), or clicking on a video item on top right (detail of an article), would take you to what is shown on bottom right; that is, video detail over article detail. Video then can be dragged to reveal underlying article and still be operable.

Now I already have a fragment that implements the dragging behavior of a video detail, that is not an issue.

My problem comes with understanding how to architect this with Navigation Component. My naivest approach would be ditching the nav component and have on my activity three fragment holders, one for the bottomnav content, one for the article detail, one for the video detail (which has to be above everything else), but getting rid of the nav component means i have to implement such things as backstack and deep linking myself.

Is this kind of navigation flow possible with navigation component? If anything, I'd like at least to get the master-article detail implemented with NavComponent, and separate the video implementation in a differnet fragment holder.

0

There are 0 answers