This tutorial will show you how to separate PartA code into fragments. Then it will also add animations and flair to the existing UI. In this tutorial you will do the following:

Prerequisites:

Migrate to AndroidX

Creating the fragment XML files

layoutResourceFile

fragmentPupControlMake

fragmentPupPicsXML

newColor

fragmentPupControlXML

Creating the fragment java files

newJavaClass

newJavaClassPupControl

Button Fragment java file

fragmentPupControlJava

Picture Fragment java file

fragmentPupPicsJava

changePupPicA

changePupPicB

Modifying the activity_main XML file:

dragInFragment

pupPicDesign

pupControlDesign

Modifying the MainActivity.java file:

Main Activity Java