Closed BulletTrain closed 9 years ago
Hi @BulletTrain ,
episode 2 won't work if you use a newer version of Leanback (22 and onwards). It would be better to start from episode 4.
I'm planning to write a library that offers this CustomBrowseFragment, this will hopefully remove the need to create a project starting from what I've written here.
@dextorer Thanks.
First,thanks for sharing this codes. I found a little bugs. setOnItemSelectedListener(getDefaultItemSelectedListener()); A quick look at the HeadersFragment source code revealed that the method has been removed and it has been replaced by setOnHeaderViewSelectedListener(OnHeaderViewSelectedListener listener).
But I can't set a OnHeaderViewSelectedListener. It can't be accessed from outside package. I try your method like this
VerticalGridView grid = getActivity().getVerticalGridView(this); grid.setOnChildSelectedListener(new OnChildSelectedListener() { @Override public void onChildSelected(ViewGroup viewGroup, View view, int i, long l) { // we can now update the content accordingly! } });
but it don't work.