Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12443] Android: focusable does not prevent focusing while using trackball

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionNot Our Bug
Resolution Date2017-07-05T17:28:33.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterMarkus Wutzler
AssigneeEric Merriman
Created2012-12-17T09:28:21.000+0000
Updated2017-07-05T17:28:33.000+0000

Description

Issue

While using the trackball within a tableview each row is selected although the focusable property is (default and explicitly) set to false.

Expected Result

Navigating with the trackball may scroll a tableview but does not select its rows.

Actual Result

Rows are selected (green background in my case, like you've tapped them) while using trackball

Repro sequence

var win = Ti.UI.createWindow({
    width:Ti.UI.FILL,
    height:Ti.UI.FILL
});

var rows = [];
for ( var i = 0; i < 50; i++) {
    rows.push({title: 'Row ' + i, focusable: false});
}
var tableView = Ti.UI.createTableView({
    width : Ti.UI.FILL,
    height : Ti.UI.FILL,
    data: rows; //maybe i used [rows] in my test case, please try both if one of this might be wrong, cause i'm writing it out of my mind.
});
win.add(tableView);
win.open();

Comments

  1. Markus Wutzler 2012-12-20

    it seems to apply to all elements. also buttons are focused although they are declared with focusable false!
  2. Eduardo Gomez 2013-01-24

    I'm not sure to follow you. The *focusable* property, i.e. http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.View-property-focusable is meant to make a View focusable or not while navigating with the trackball. In Android all the clickable UI items are expected to get focus and be clicked with trackball/dpad mode. That expected Android behavior it will try to focus the first UI item. You can also try to set it to be fully transparent but it could get cosmetic side effects. I'll leave this open for a while in case of any clarifications.
  3. Markus Wutzler 2013-01-26

    [~egomez] Sorry but maybe i didn't understand what *focusable* correctly. But if you try the example above there is no difference between foucsable: true and focusable: false. So what should be different?
  4. Eduardo Gomez 2013-01-28

    Make sure that all user interface elements that can accept input (touches or typing) can be reached with a directional controller, such as a trackball, D-pad (physical or virtual) or navigation gestures. Moved to main project to dig into it. Labels and format updated.
  5. jithinpv 2013-03-15

    device specific,track ball required jithinpv
  6. Lee Morris 2017-07-05

    Closing with reference to the above comments.

JSON Source