Screen Orientation - Often within apps, the portrait version of an activity has a substantially different layout from the landscape version.Fragments enable device-specific activities to reuse shared elements while also having differences. Tablet Support - Often within apps, the tablet version of an activity has a substantially different layout from the phone version which is different from the TV version.For example, using the same list across different data sources within an app. Reusing View and Logic Components - Fragments enable re-use of parts of your screen including views and event logic over and over in different ways across many disparate activities.There are many use cases for fragments but the most common use cases include: Within a fragment-oriented architecture, activities become navigational containers that are primarily responsible for navigation to other activities, presenting fragments and passing data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |