Android TV: How to customize left navigation panel of android TV using Leanbak?
Asked Answered
E

3

6

Currently I am working an android tv application project and my navigation panel is showing text and icon when it is in expanded mode like -

expanded

When navigation panel is collapsed it showing a vertical bar with just color and no icons or something is showing.

But I am trying to achieve this kind of design when navigation panel is collapsed -

collapsed

Now my question is is this achievable using leanback and if possible how can I implement it? Any kind of hints, tips or reference will be helpful. Thanks in advance.

Eucken answered 1/1, 2020 at 7:58 Comment(0)
C
2

This type of functionality is not supported in Leanback. And I too searched the solution for it everywhere but didn't find anything useful. So I ended up writing a Fragment that behaves like the sidebar navigation and works with RowsSupportFragment through an interface for exchanging KeyPad Events.

When in Expanded State -> Menu Icon & Menu Names are shown.

When in Collapsed State -> Menu Icons are shown.

check out this repository TVNavigationMenu

Navigation Closed

Caridadcarie answered 12/7, 2020 at 13:40 Comment(4)
i have used your Example can we do this with a dynamic category with left nav can you please help me thisUrson
hi, @Urson drop me your mail id. let's connect over that.Caridadcarie
Hi @Arpit let me know if you are able to send me a mail I need help with this. ThannksUrson
Hi @Arpit J Thanks for helping me can you suggest how to achieve this. ThanksUrson
H
0

I think you can try Navigation Rail from Material Design. It is not a same thing but can get you somewhat close to your desire behavior or an alternative solution.

Here is link: https://m2.material.io/components/navigation-rail

Hultgren answered 1/9, 2023 at 17:52 Comment(0)
C
0

I think you can slide the view on the right side of the view to the left a part of the distance to cover the TextView in the NavigationBar on the left and only display the ICON.

Carping answered 31/7 at 9:18 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewHaggis

© 2022 - 2024 — McMap. All rights reserved.