Question: This is java android development class. Introduction The goal of this lab is to understand how to nest one fragment inside another fragment and how
| This is java android development class. Introduction The goal of this lab is to understand how to nest one fragment inside another fragment and how to use the child fragment manager to manage fragment transactions. Activities The BeerAdviser app is completed in lab2. The Stopwatch app is completed in lab3 Change the FindBeerActivity into a Fragment called FindBeerFragment with associated FindBeerFragment layout xml file. Add mainActivity to the project FindBeer, and the mainActivity only contains one fragment element which is the FindBeerFragment. Change the Stopwatch activity to a fragment Nest the stopwatch fragment into the FindBeerFragment. Make sure everything in the Stopwatch fragment works well Some source codes are attached as following you might make a reference to.
|
|
| |
| | |
| android:layout_height="match_parent" | |
| android:layout_width="match_parent" | |
| android:orientation="vertical"> | |
|
| |
| | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:textAppearance="?android:attr/textAppearanceLarge" | |
| android:text="" | |
| android:id="@+id/textTitle" /> | |
|
| |
| | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:text="" | |
| android:id="@+id/textDescription" /> | |
|
| |
| | |
| android:id="@+id/stopwatch_container" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" /> | |
|
| |
| | |
| class="com.hfad.workout.WorkoutListFragment" | |
| android:id="@+id/list_frag" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent"/> |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
