Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5119] Android: Handle Android hardware back button on lightweight windows

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-06-28T11:15:43.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sRelease 2.0.2, Release 2.1.0
ComponentsAndroid
Labelsapi, qe-port
ReporterFrancisco Antonio Duran Ramirez
AssigneeVishal Duggal
Created2011-08-26T11:14:38.000+0000
Updated2013-06-10T23:22:58.000+0000

Description

Feature request

Problem

Handle Android hardware back button on lightweight windows it does not work.

Reproducible steps:

1.Run the code below.

Expected behavior

Customer wants to handle Android hardware back button on lightweight windows.

Sample Code:

// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});

var label1 = Titanium.UI.createLabel({
 color:'#999',
 text:'I am Window 1',
 font:{fontSize:20,fontFamily:'Helvetica Neue'},
 textAlign:'center',
 width:'auto'
});

win1.add(label1);


win1.addEventListener('android:back', function(e) {
    alert('You pressed the back button')
});
win1.open();

Associated HD Ticket.

APP-579337

Comments

  1. Junaid Younus 2012-06-28

    Issue is fixed with 2.0.2GA. Tested on a Samsung Galaxy S2. Ticket closed.
  2. Rima Umbrasas 2012-08-13

    Verified fixed with mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: Galaxy S III Android version 4.0.4

JSON Source