Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8258563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:34:59+00:00 2026-06-08T02:34:59+00:00

I am developing app for the google tv and i have to use left

  • 0

I am developing app for the google tv and i have to use left navigation bar in my app. I downloaded the google tv examples and am playing with the leftnavbar to make it work as per my requirements. I want it to behave like the one tv & movies OR youtube app for Google TV. It should expand when focus is moved to its tabs by LEFT D-Pad key and collapse when I move focus from it using RIGHT D-Pad key.

I did’t know if there are any properties which will help me achieve this functionality.

So I tried by registering the setOnFocusChangeListener listener and calling flipOption(LeftNavBar.DISPLAY_AUTO_EXPAND) function in it as follows to force it to behave the way i want:

  private LeftNavBar getLeftNavBar() {
    if (mLeftNavBar == null) {
       -------
       -------
        mLeftNavBar.setOnFocusChangeListener(new View.OnFocusChangeListener() {

            @Override
            public void onFocusChange(View v, boolean hasFocus) {

                flipOption(LeftNavBar.DISPLAY_AUTO_EXPAND);
            }
        });


    }
    return mLeftNavBar;
}

Now the above code works fine when there is nothing in leftNavBar. It shows/hides upon receiving/loosing focus. But it does not work when I add some tabs in it.

Any Idea how to achieve it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:35:01+00:00Added an answer on June 8, 2026 at 2:35 am

    The googletv-android-samples has both the LeftNavBar code and the LeftNavBarDemo. If you use the LeftNavBarDemo, you can see which settings you need to accomplish the behavior your looking for.

    It’s just setting the correct options – You really don’t need to flipOption onFocusChange – it will expand and contract automagicly if you set the right initial options. I’d give you specifics, but each application is different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing in Google App Engine (python sdk) and I want to use jQuery
I'm developing a iPhone application that will use a Google App Engine backend and
How do I use external library while developing applications on google app engine ?
I am developing an app which makes use of Google Maps. It runs fine
I'm developing a app in Google app Engine with GWT and GXT so i
I'm considering developing an app for Google App Engine, which should not get too
Iam developing an android app.about google maps API for android i want to ask
I've been developing a Facebook app using Google App Engine in Python and the
I am developing Python application for Google App Engine on MacOS and I am
I'm developing software on google app engine. I'm using the webapp framework. is there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.