In order to put this example together entirely and have a working content-centric screen (although only in the example sense), we need some Java code. This code will handle populating the user interface layout with an
Album object. For this next piece of code, you'll need images for the cover art and for the artist's logo.
ShopActivityJava source file in an editor or IDE.
onCreatemethod, ensure that the
main.xmllayout resource is being set as the content view for the
setAlbummethod with the contents of your favorite music album:
Resources resources = getResources(); setAlbum(new ...