3

正在使用Leanback support library. 我需要在 的右上角(徽章下方)显示一个按钮BrowseFragment。(如下图所示)

hep_img

这是布局代码

<?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"/>

我怎样才能做到这一点?无法从 Google 找到任何解决方案。

4

1 回答 1

1

您可以使用 browseTitleViewLayout 属性创建自定义 TitleView 并将其设置为活动主题。

于 2017-02-01T17:48:08.270 回答