3

I am developing an Android TV app using Leanback support library. I need to display a button in the top right corner (below the badge) of BrowseFragment. (as on below image)

hep_img

Here is the layout code

<?xml version="1.0" encoding="utf-8"?>

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_browse_fragment"
    android:name="tv.bishan.com.videoapp.ui.ItemFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity"
    tools:deviceIds="tv"
    tools:ignore="MergeRootFrame"/>

How can I achieve this? Unable to find any solution from Google.

Bishan
  • 15,211
  • 52
  • 164
  • 258

1 Answers1

2

You can create custom TitleView and set it to the activity theme using the browseTitleViewLayout attribute.

Viktor Dolgalyov
  • 274
  • 2
  • 12