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

  • Home
  • SEARCH
  • 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 9127017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:11:10+00:00 2026-06-17T07:11:10+00:00

I have a project that involves using the Google TV UI Closure library for

  • 0

I have a project that involves using the Google TV UI Closure library for keyboard/d-pad navigation. I’m using the code copied right from Google’s appspot tvui demos for a tv-tab-container

<div class="tv-tab-container tv-container-vertical">
  <div class="tv-tab-container-bar tv-container-horizontal">
    // Tab bar components.
  </div>
  <div class="tv-tab-container-content tv-container-horizontal">
    // Content components.
  </div>
</div>

I was under the impression that the closure library would handle changing the content of the tabs, but it doesn’t. Does anybody know the Javascript required to make the tabs function? I don’t quite understand the closure library’s event handling with the tv-tab-container-bar tabs.

  • 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-17T07:11:11+00:00Added an answer on June 17, 2026 at 7:11 am

    Well after all this I ended up just writing my own event listeners for keyboard left and right when focused on the tv-tab-container, and used the setFocusedComponent() to change the tab-content accordingly by using dynamically created div id’s. I’m still not entirely sure why every other tv-ui component works for me but the tv-tab-container, but this mimics the same behavior that I was after

    function updateTabContent(content, tab)
    {
    //sets the correct tab and content to be focused and visible
    var allContentDivs = $('.tab-demo-content').hide();
    var contentToShow = $('#'+content);
    contentToShow.show();
    
    var elementToFocus = goog.dom.getElement(content);
    var componentToFocus = tv.ui.getComponentByElement(elementToFocus);
    tv.ui.Document.getInstance().setFocusedComponent(componentToFocus);
    
    elementToFocus = goog.dom.getElement('tab' + tab);
    componentToFocus = tv.ui.getComponentByElement(elementToFocus);
    tv.ui.Document.getInstance().setFocusedComponent(componentToFocus)
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java application that is managed using Maven. The project involves the
I am working on a project right now that involves receiving a message from
Members at work have come across a C# project posted on Google code that
I have just started a project that involves me sending data using POST in
I have a project that involves polling a hardware switch each update and converting
I have a project that using some third-party libraries. My questions is how to
I'm working on a project that involves uploading an image to tumblr from Python.
I am working on a project that involves me using a HashSet of a
I have a new project I am working on that involves fetching a webpage,
I'm working on a project that involves creating a spline from a defined set

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.