Question: Please provide the code for the entire app. Instructions: Update the application from your previous assignment to support different behavior based on device orientation. 1
Please provide the code for the entire app.
Instructions:
Update the application from your previous assignment to support different behavior based on device
orientation.
Add an alternate layout for your BrowserActivity that will be used when your device is in
Landscape orientation. This alternate layout must contain all the containers found in the default
layout, with an additional containers: pagelist illustrated below
Create a new fragment class, PageListFragment, with the following features:
This fragment should contain a RecyclerView, and is able to notify the activity when an
item in the list has been clicked.
The items shown in the RecyclerView should be TextViews, each displaying the title of
one of the pages currently being displayed by all PageViewerFragment loaded in the
ViewPager If there is no title for the page being viewed, you may use placeholder text
or a snippet of the URL.
When an item in the RecyclerView is clicked, the PageViewerFragment associated with
that selected page should displayed in the activitiys ViewPager
BrowserActivity should behave as follows:
Attach the necessary fragments and views
In Portrait mode, the activity should display a single instance of
BrowserControlFragment in the browsercontrol container, and the ViewPager
essentially it should look and behave exactly like the previous assignment
In Landscape mode, the activity should display a single instance of
BrowserControlFragment and PageListFragment in the browsercontrol and pagelist
containers respectively. Additionally, it should continue to display the ViewPager
When the user click on the NewPage ImageButton in BrowserControlFragment, a new
instance of PageViewerFragment should be created, attached and displayed in the
ViewPager If in Landscape mode, the page should also be listed in the RecyclerView
found in the PageListFragment.
The activity should continue to display as its title the page title of the currently displayed
page.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
