dextorer / buildingforandroidtv Goto Github PK
View Code? Open in Web Editor NEWCode for the "Building for Android TV" series of articles.
Home Page: https://medium.com/@rotxed
License: MIT License
Code for the "Building for Android TV" series of articles.
Home Page: https://medium.com/@rotxed
License: MIT License
Thanks for your great blog posts and samples. I noticed that in your Musixmatch app, the fragments that contain multiple rows automatically hide the brand logo/search orb and fill the full vertical height as you scroll down. In this sample, though, those elements remain shown at the top and the rows scroll in the viewable area below them. What did you do to fix this behavior?
Hi dextorer,
I tested your source code episode_4 today, and I got default activity not found error.
It could be resolved by adding tag on line 53 and 56.
Just for information.
Your source code helps me studying android TV app, thank you.
Is this code still usable?
Looks like android.support.v17.leanback.widget.OnItemSelectedListener is missing from the current (22.1.1) v17.leanback API too... or am I wrong?
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.
I need the id and name to have a dinamic custom Fragment - extends RowsFragment.
Thx
Hello,
Thank you for your amazing article.
May I ask the question that in the title of this issue?
Since it would be difficult if we update the leanback lib to the latest version.
I met a problem that I want to control badge visibility base on the header drawer, however, I don't know how to do it since the headerFragment don't give out a way to verify is the drawer open or close.
Thank you in advance for your kind answer!
Hi,
I hope you are doing well,
I am using LeanBack code for the Android TV platform. But I have one issue. As per our requirement, We need to put the video player on the top of the row fragment and manage focus from rows to the video player.
After more research on the Leanback library, we are supposed to use the BrowseFragment to achieve the expected result.
Now the problem is how to design the preview section at the top with the Video player as the BrowseFragment shows the Rows from the bottom corner of the screen. How can we customization browse fragment or Row Fragment to resolve this?
Hey there,
app is crashing once again when moving from rows to header section:
public synchronized void toggleHeadersFragment(final boolean doOpen) {
......
final View rowsContainer = (View) rowsFragment.getView().getParent();
Unsupported method: BaseConfig.getApplicationIdSuffix().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Hi,
Testing to load 10 rows of 100 CardPresenters, it gets very laggy when fast scrolling even on very powerful android boxes.
Picasso v 2.4 has pauseTag() and resumeTag() made for this exact purpose. Their sample app uses a AbsListView onScrollListener and pauses/resumes the picasso bitmap loading in (fast) scroll mode.
Any way to implement this with leanback and your CustomRowFragment?
Hi,
First let me say thank you for publishing these guides. They've helped me out quite a bit.
I'm currently trying to build on these techniques; specifically, I'd like to use a VerticalGridFragment
as the content view of a BrowseFragment
(instead of a RowsFragment
). I've got it mostly working, but there are a few strange behaviours that I haven't been able to get around.
The biggest issue at this point is that the animation of the rows_container
doesn't appear to work correctly. If the right-most grid item is focused, and the drawer is opened, the rows_container
does not slide right, instead its width seems to shrink, and the drawer slides over-top.
Would you be able to provide any insight into what could be happening? I can provide more info about my setup if needed.
Cheers!
Episode 3 is crashign due to following error in TvDemoActivity.java file:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sample.example.TvDemoActivity}: java.lang.ClassCastException: android.widget.FrameLayout cannot be cast to com.sample.example.CustomFrameLayout
It's a space with gray background color of your own picture in your blog.
https://cdn-images-1.medium.com/max/800/1*oIFbcdjYrIqxU55-B23tjA.gif
The "android" command is no longer included in the SDK. Any references to it (e.g. by third-party plugins) should be removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.