I am developing app for android in titanium.In a single window i am adding multiple views.On back button press, i want to remove the current view.In HTML we use location.hash to get the current div .Is there is any method to get the current view using titanium.Here is my code. var win = Ti.UI.currentWindow; var background = Ti.UI.createView({ height:'98%', width:'100%', top:0, backgroundColor:'#258acd' }); var Btn=Ti.UI.createButton({ title:'Click', height:'auto', width:'auto' }); var logo=Ti.UI.createImageView({ width:'auto', height:'auto', image:'images/logo.png', top:0, align:'center'
}); var background1 = Ti.UI.createView({ height:'98%', width:'100%', top:0, backgroundColor:'#ffffff' }); Btn.addEventListener('click',function(e){ win.add(background1);
}); var footer=Ti.UI.createView({ bottom:0, width:'100%', height:12, backgroundColor:'#ffd426'
}); win.addEventListener('android:back', function (e) { alert('back'); });
background.add(logo); background.add(Btn); win.add(background); win.add(footer);
when i am on background1 view i want to move background view on back press.how it will be possible???