So basically here in the left menu row I want to set a custom image i.e. the whole blue thing in background in menu a custom image has to come.In leanback they give us the api set brand color to set color but nothing to set image .Is there any way to achieve this? Thanx in advance
Asked
Active
Viewed 1,062 times
1 Answers
3
If you are talking about navigation drawer of design support library then this is how you do it :
//you basically create a layout with a background image and other views
navigationView.inflateHeaderView(R.layout.drawer_header)
[Edit] Try something like this for leanback:
HeasdersFragment hf = browseFragment.getHeadersFragment();
hf.getView().setBackgroundResource()

dumb_terminal
- 1,815
- 1
- 16
- 27
-
Actually its about the header fragment in leanback library. – prit Jul 31 '16 at 11:05
-
The thing is header fragment is not in my control.These inflating happens internally in browse fragment I somehow need reference to it so that I can set background to parent view. – prit Aug 01 '16 at 06:25
-
Hi @dumb_terminal can you have a look at this problem also ?http://stackoverflow.com/questions/38697575/making-imagecardview-in-browse-fragment-totally-transparent/38697634?noredirect=1#comment64774998_38697634 – prit Aug 02 '16 at 05:29
-
how to change background color for header fragment using style? – Tomero Indonesia Feb 22 '18 at 04:42