WRTkit focus highlight style problems
I am using wrtkit 1.0 framework for a wrt application. My application has two ListView objects, one that lists categories and one that lists details. User selects a category to view its details. When I go back from the details ListView to the category ListView I want the selected category to be visually highlighted, ie have focus.
It seems that wrtkit always highlights the first control in the ListView not the one with focus.
I have tried the following code to give highlight style to the focused control but wrtkit only gives focus highlight to the first control in the list.
uiManager.setView(categoryView); // show the category view
var btns = categoryView.getControls(); // get the list of controls in the view
// selectedCategory is a number representing the control that was selected
// give focus to the control with selectedCategory as its index
var focusedControl = categoryView.getFocusedControl(); // get the index of the focused control
alert(focusedControl.id); // display this index in the alert box to test
WRTkit correctly identifies the control with focus but does not seem to change the style of the control to show that it has focus and instead defaults to the first control being highlighted. This is a confusing behavior and is not intuitive for applications. Returning to the category view should show the previously selected category with the highlight, not the first one.
Is this a bug? or is there another way for wrtkit to change highlight to the focused control instead of always showing highlight on the first control. How can I get wrtkit to show highlight style for the control with focus in a ListView?
Re: WRTkit focus highlight style problems
Did you ever find a solution to this?
I have a similar problem.
I have a list view with multiple controls, Two text fields followed by two buttons. In the emulator and on my 5800 which has wrt 1.1 I can select and edit the controls perfectly but when I test the app on a phone with wrt 1.0 when you try to select the next control by pressing down it jumps 3 or four controls. I have no code that automatically focusses any control so I have absolutely no idea why its doing this.