BuildingForAndroidTV icon indicating copy to clipboard operation
BuildingForAndroidTV copied to clipboard

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

Open LLin233 opened this issue 8 years ago • 4 comments

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!

LLin233 avatar Jul 29 '16 23:07 LLin233

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.

dextorer avatar Jul 30 '16 07:07 dextorer

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

LLin233 avatar Jul 31 '16 07:07 LLin233

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.

dextorer avatar Aug 01 '16 12:08 dextorer

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.

LLin233 avatar Aug 01 '16 20:08 LLin233