dextorer / BuildingForAndroidTV

Code for the "Building for Android TV" series of articles.
https://medium.com/@rotxed
MIT License
104 stars 59 forks source link

Do we have to copy the source code file in order to customize BrowseFragment? #13

Open LLin233 opened 8 years ago

LLin233 commented 8 years ago

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!

dextorer commented 8 years ago

Have you tried using Sofa instead? This is just the source code that was written for the articles, while Sofa is a full fledged Android TV library.

LLin233 commented 8 years ago

No, it is not a personal project..I could not use it....may I ask how to do it without Sofa?

dextorer commented 8 years ago

OK. Back to your question, it depends on what you're trying to do. If it's mostly showing/hiding stuff, then using Reflection is sufficient for most of the cases. Otherwise yes, you need to copy the source code and modify it to your needs.

LLin233 commented 8 years ago

so I am trying to control the visibility of the layout shows badge. When the Sidebar shows, badge layout shows, otherwise the layout will be hidden so that it doesn't leave the margin on the top. I saw a showTitle() method on the superclass, but it looks like just running the animation instead changing the layout. so I am stuck. You are the most experienced dev for android tv who I met over Github, I really appreciate your help.