Creating and building an Android TV application
In this section, we will take a look at how to create an Android TV application using the default Android TV template that Android Studio provides us with. As we progress through the chapter, we will learn how to customize the Android TV user interface by creating our very own custom fragment classes to display header and row content information within the Android TV user interface.
Note
In Android, a fragment is a class that represents a behavior or portion of the user interface within an activity. Fragments were introduced to help produce the user interface, so that it can adapt to the various device orientations as well as function seamlessly across phones and tablets. You can even use multiple fragments within the same activity and rearrange them when the user rotates their device.
Firstly, create a new project in Android Studio by following these simple steps:
Launch Android Studio, and then click on the File | New Project menu option.
Next...