简体   繁体   English

添加按钮到BrowseFragment

[英]Add button to BrowseFragment

I am developing an Android TV app using Leanback support library . 我正在使用Leanback support library开发Android TV应用程序。 I need to display a button in the top right corner (below the badge) of BrowseFragment . 我需要在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. 无法从Google找到任何解决方案。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM