The reason for this is that the two fragments do not appear onscreen at the same time we manage them in separate activities and each activity containing one fragment. However, in the case of a portrait-oriented handset, we chose to display the book list and the book description on separate screens. As both of these fragments appear onscreen at the same time, we display and manage them from a single activity. One fragment displays the list of book titles, and the other fragment displays the description of the currently selected book. In the case of a wide-display device( tablet devices), our application uses a single activity containing two fragments. We used fragments only to represent subsections within each screen.Įxample, let’s think back to the way we constructed our book browsing application. Until now, we’ve considered each activity to always correspond to a single screen in our application. The idea is to create interactive UIs that use fragments to dynamically change the appearance of the screen in response to user actions. monitoring user interaction with the back button.dynamically managing fragments within an activity,.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |