Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

TFragments.01-Exercise-CreateBodyPartFragment #9

Open
wants to merge 1 commit into
base: TFragments.00-StartingCode
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class AndroidImageAssets {
addAll(bodies);
addAll(legs);
}};


// Getter methods that return lists of all head images, body images, and leg images

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,21 @@
// This activity will display a custom Android image composed of three body parts: head, body, and legs
public class AndroidMeActivity extends AppCompatActivity {

// TODO (1) Create a layout file that displays one body part image named fragment_body_part.xml
// This layout should contain a single ImageView

// TODO (2) Create a new class called BodyPartFragment to display an image of an Android-Me body part
// In this class, you'll need to implement an empty constructor and the onCreateView method
// TODO (3) Show the first image in the list of head images
// Soon, you'll update this image display code to show any image you want



@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_android_me);

// TODO (5) Create a new BodyPartFragment instance and display it using the FragmentManager
}
}
4 changes: 4 additions & 0 deletions app/src/main/res/layout/activity_android_me.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">

<!-- TODO (4) Create a container to hold the head BodyPartFragment of the custom Android -->
<!--The container should be 180dp in height -->



</LinearLayout>

Expand Down