Note that there are some explanatory texts on larger screens.

plurals
  1. POCorrect usage of both Navigation Drawer and Tabs
    primarykey
    data
    text
    <p>I'm struggling to understand how Google wants an app to behave when both a navigation drawer and tabs are needed.</p> <p>Since fragments cannot/shouldn't be nested, wouldn't it make sense that the navigation drawer cycled through Activities and not Fragments? Thus, in their turn, each activity could be a tabbed view, etc.</p> <p>My issue in code is that the Navigation Drawer (as per demo/examples) start with a Main Activity for the parent and provide Fragments of different views.</p> <p>A <code>ViewPager</code> with swipe tabs has a <code>FragmentActivity</code> as its parent and <code>Fragment</code>s as the child.</p> <p>Bad enough that most examples are mixed between the <code>android.support.v4</code> libiraries and the native ones, I might be missing something else?</p> <p>I am assuming that for my purposes, I should be using a Navigation Drawer to cycle Activities and then continue from there. Is that a 'correct' design or should I be doing something different?</p> <p>TIA</p> <p><em>edit</em></p> <p>I'll be more specific: Under the support library, how can I implement the below:</p> <pre><code>Parent: MainActivity (has navdrawer) Child of Main: SwipeActivity1 (has swipe tabs) Child of Swipe: ContentPage1 (has content) </code></pre> <p><strong>Should that be, FragmentActivity -> FragmentActivity -> Fragment ?</strong></p> <p>When not using the support library, how is this done? (and non-nested fragments)</p> <p><strong>Should it be, Activity -> Fragment -> Fragment ?</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload