Search code examples
androidlayouttabletsmartphone

Same app, one or two Android projects


I have to build an app for both smartphone and tablet.
In two cases, in the tablet version, I am going to use two Fragments.
But in the smartphone version, I'll use a NavigationDrawer.

So my question is, should I make two different projects, or just one and make different classes for tablet and smartphone?


Solution

  • I think you can use a single project to do this, but with extensive use of fragments. And i feel that u can use fragments for both phone and tablet, by using multiple activities on a phone and a single activity on the tablet since the larger screen size can accommodate multiple fragments without congestion.

    If you are a beginner, slidenerd tutorials are really good to learn about fragments. All the best