The DetailsFragment
The DetailsFragment is displayed when the user selects a specific piece of content on the BrowseFragment. It contains information like title, subtitle, and description, and is accompanied by a preview of the content.
One of the most important classes used in the DetailsFragment is DetailsOverViewRow. This class defines which content is displayed in the fragment and, most importantly, is responsible for defining the actions that you can prompt your user to perform.
DetailsFragment. Just by coding addAction(), you can add a new action for the user to perform. In this case, you added the unique ID ACTION_WATCH_TRAILER, for the action and two strings, Watch Trailer and FREE, to define the text field of the button.
After you have added this line, the action will be displayed on the DetailsFragment.
By using actions, you can easily add IAP items like “Rent the Content,” “Buy,” or “Subscribe;” it’s just a matter of attaching a Listener to the actions to perform consequent tasks.
When you deploy a Leanback-enabled project, the only action that is defined by default is “Watch Trailer,” which prompts the trailer of the content to play.

