浏览片段定制
Browse fragment customisation
我想定制一个BrowseFragment
。
通常,BrowseFragment
由多行(header + 项)组成。
我的问题:同一行(以蓝色突出显示)是否可以有不同的项目类型? (见下图)。
谢谢。
您可能想尝试使用 Presenter to implement customization of the header views in a more complex layout. And as mentioned in Creating a Catalog Browser,同时使用适配器和演示器,BrowseFragment
class 允许您定义和显示可浏览的媒体内容类别和媒体项目来自媒体目录。
为了更好地理解和获取更多示例,您可能还想查看这些教程:
希望对您有所帮助!
这是 Google 提供的示例:CardPresenterSelector.java. The example is part of Leanback-Showcase, if you download and run it you'll notice they don't actually do what you are specifically looking for - but I believe its setup to do so if you just made some edits in the CardPresenterSelector (linked above). (There's also a nice youtube video 配合使用)
我想定制一个BrowseFragment
。
通常,BrowseFragment
由多行(header + 项)组成。
我的问题:同一行(以蓝色突出显示)是否可以有不同的项目类型? (见下图)。
谢谢。
您可能想尝试使用 Presenter to implement customization of the header views in a more complex layout. And as mentioned in Creating a Catalog Browser,同时使用适配器和演示器,BrowseFragment
class 允许您定义和显示可浏览的媒体内容类别和媒体项目来自媒体目录。
为了更好地理解和获取更多示例,您可能还想查看这些教程:
希望对您有所帮助!
这是 Google 提供的示例:CardPresenterSelector.java. The example is part of Leanback-Showcase, if you download and run it you'll notice they don't actually do what you are specifically looking for - but I believe its setup to do so if you just made some edits in the CardPresenterSelector (linked above). (There's also a nice youtube video 配合使用)