leanback

Leanback DetailFragment FullWidthDetailsOverviewRowPresenter customization

a 夏天 提交于 2019-12-07 17:11:26
I want to customize the FullWidthDetailsOverviewRowPresenter in the Leanback DetailFragment . Three things I want to accomplish are: Getting the Action s from top to below of the overview. Reducing the height of the overview so that it the related movies can be seen without scrolling down. The background image and the space it occupies at the top of the overview should be gone. The screen should start like the one above. The end result should be like this: I already know how to modify inside the overview. How should I modify outside of it? Because you are moving around the key views of this

Implementing a File Dialog in Android TV Leanback

若如初见. 提交于 2019-12-05 20:40:57
问题 I have a dirPath String variable that I want to be able to change to a directory of my choice for an Android TV app. I find the Leanback framework's slideshow-like interface a little cumbersome for subtler actions but I would like to stick to it when I can as I'm a complete beginner on Android and java in general. So, trying to stick to best practices, I would like the user to be able to change dirPath to point to a directory of their choosing ( dirPath is used as a variable to scan for music

Leanback for Android TV : Unsetting Video Title Increases Spacing between Rows

怎甘沉沦 提交于 2019-12-05 18:35:57
The PlaybackOverlayFragment of the sample app uses the PlaybackControlsGlue to set up playback controls based on the data model. This is the look when using the standard glue: My problem is that I don't want the title/subtitle text to appear above the main player controls bar - we want them at the top left of the player screen instead. Therefore, to disable the showing of title/subtitle, I override createControlsRowAndPresenter() of the glue and use the empty-args constructor of PlaybackControlsRowPresenter instead: @Override public PlaybackControlsRowPresenter createControlsRowAndPresenter()

Android TV: VerticalGridFragment shadow dimension and color

ⅰ亾dé卋堺 提交于 2019-12-05 18:33:12
I'm working on an Android TV application but I'm not quite happy with the standard shadow rendered by the VerticalGridFragment , I'd like to have it smaller and a bit less darker. I've searched through the code but I didn't find any full working solution. In my VerticalGridPresenter subclass, the only method I can override is createShadowOverlayOptions but I can't get the result I want. The only workaround I came up with is to define the following dimensions, so that the ones declared in the Support Library are overridden: <dimen name="lb_material_shadow_details_z">3dp</dimen> <dimen name="lb

how to always show headers in RowsFragment

这一生的挚爱 提交于 2019-12-04 04:36:28
I'm trying to create an Android tv application similar to the Youtube application. and I am using the Sofa library to do that. Now the problem comes when I am trying to show the headers for individual items in the RowsFragment even when the RowsFragment doesn't have a focus. following is the code for loading the dataset into browseFragment private void loadRowsCustom() { adapter = new ArrayObjectAdapter(); int split = 3; int rowsFragmentCount = videoList.size() / split + (videoList.size() % split != 0 ? 1 : 0); for (int i = 0; i < rowsFragmentCount; i++) { ListRowPresenter lrp = new

Implementing a File Dialog in Android TV Leanback

和自甴很熟 提交于 2019-12-04 03:15:58
I have a dirPath String variable that I want to be able to change to a directory of my choice for an Android TV app. I find the Leanback framework's slideshow-like interface a little cumbersome for subtler actions but I would like to stick to it when I can as I'm a complete beginner on Android and java in general. So, trying to stick to best practices, I would like the user to be able to change dirPath to point to a directory of their choosing ( dirPath is used as a variable to scan for music in the nominated directory and its subdirectories). On other platforms I would look for a standard

Leanback VerticalGridFragment remove top spacing

谁说胖子不能爱 提交于 2019-12-04 02:15:35
I am using VerticalGridFragment to display items in a grid-like layout I don't need to show search or title and I want the rows to start from top of the screen without any margins. Any help? mehmoodnisar125 You need create new class with name CustomVerticalGridPresenter and put followig code in it . public class CustomVerticalGridPresenter extends VerticalGridPresenter { VerticalGridView gridView; CustomVerticalGridPresenter(int zoom, boolean val){ super(zoom, val); } @Override protected void initializeGridViewHolder(ViewHolder vh) { super.initializeGridViewHolder(vh); gridView = vh

Multiple ListRows for each Header on BrowseFragment - Leanback library

元气小坏坏 提交于 2019-12-03 12:31:41
I'm getting started with Leanback support for our app. As per UI requirements I need to add multiple list rows corresponding to each header, it's exactly like what Youtube App does on Android TV. Default ListRowPresenter seems to be rendering only one list row and its header. Is there any presenter that supports multiple list rows? I'm thinking on the lines creating a custom presenter with RowsFragment embedded in each item, correct me if my approach is wrong. The Leanback team has recently added in support for multiple ListRow s for one HeaderItem in version 24.0.0 of the library. It allows

Remove background from ImageCardView

折月煮酒 提交于 2019-12-02 09:57:07
问题 I started using new android.support.v17.leanback library and have some trouble in styling ImageCardView . I am changing the image on ImageCardView to have a different shape so I would like to remove background and shadow which are automatically generated when using the card in ListRow for example. If I leave the shadow, my card looks weird because shadow and background are showing like the card is square. I've tried to set the different background to all the elements but it doesn't work. If I

Disable row scaling / expand in BrowseFragment

你说的曾经没有我的故事 提交于 2019-12-01 09:15:02
I have not found any documentation how to disable the row scaling when switching the focus from the Headers to the Fragments in a BrowseFragment. Leanback version 24.2.0 The BrowseFragment has a function enableMainFragmentScaling which solves the problem partially. The images now have the full size, but the titles are still not expanded like they are in the PlayStore App, Youtube app. The expand (without animation) when focusing a row. What i did so far: enableMainFragmentScaling(false); in BrowseFragment setExpand(false); in the nested RowsFragments. But it didn't change anything. The Code is