android - Activity or Fragment? -


I'm new to Android programming, researching and reading Android's manuals I have seen that you use activities and pieces can do. I have understood that one piece is a simple activity, for example, I can create an app with buttons that create new activities or I can create an app with only one app which can be used with another button Opens with a common section. So my questions are: when using one or the other is more convenient? Can I get the same functionality? One more final question: I want my app to get a drawer similar to the Facebook app, is it a piece or a regular drawer that has the effect? Thank you very much

You actually use both. One piece can not live without a hosting activity

As a simple rule of thumb, use pieces everywhere that use reusable or plug-in interfaces, use activity in simple places, which does not call for any troop, such as splash screen.

For Facebook Draces Cheesy, this is ->


Comments