Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-639] Crash with createButtonBar on Android Simulator

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T02:33:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M10
ComponentsAndroid
Labelsandroid, buttonbar, crash, defect, release-1.6.0
Reporterkyo.alone
AssigneeDon Thorp
Created2011-04-15T02:33:26.000+0000
Updated2017-03-02T18:51:42.000+0000

Description

//Titanium version 1.1.2

I have a NullPointerExeption when I created a ButtonBar in app.js :

var win = Titanium.UI.createWindow({

title:'Tab 1',
backgroundColor:'#fff'

});

var buttonBar = Titanium.UI.createButtonBar({id:'buttonbar', labels:['Left', 'Right'],backgroundColor:'#336699'});

//button Bar is null

buttonBar.addEventListener('click',function(e)
{

var a = Titanium.UI.createAlertDialog();
a.setTitle('Buttonbar Test');
a.setMessage('You click button index = ' + e.index);
a.show();

});

win.add(buttonBar);

win.open();

Comments

  1. kyo.alone 2011-04-15

    I found it, I should create a view and add the buttonBar in this view.

  2. Stephen Tramer 2011-04-15

    Assigning to Don for triage.

  3. Don Thorp 2011-04-15

    ButtonBar is not an Android control.

  4. Lee Morris 2017-03-02

    Closing as invalid.

JSON Source