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.
1. 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: page_list (illustrated below).
2. Create a new fragment class, PageListFragment, with the following features:
1. This fragment should contain a RecyclerView, and is able to notify the activity when an
item in the list has been clicked.
2. 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
ViewPager2. If there is no title for the page being viewed, you may use placeholder text
or a snippet of the URL.
3. When an item in the RecyclerView is clicked, the PageViewerFragment associated with
that selected page should displayed in the activitiys ViewPager2.
3. BrowserActivity should behave as follows:
1. Attach the necessary fragments and views
1. In Portrait mode, the activity should display a single instance of
BrowserControlFragment in the browser_control container, and the ViewPager2
(essentially, it should look and behave exactly like the previous assignment).
2. In Landscape mode, the activity should display a single instance of
BrowserControlFragment and PageListFragment in the browser_control and page_list
containers respectively. Additionally, it should continue to display the ViewPager2
2. When the user click on the NewPage ImageButton in BrowserControlFragment, a new
instance of PageViewerFragment should be created, attached and displayed in the
ViewPager2. If in Landscape mode, the page should also be listed in the RecyclerView
found in the PageListFragment.
3. 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!