Back button exits application in android using appcelerator titanium
Asked Answered
D

1

5

I am new to Titanium Development. In Native android if we press back button only current activity will be closed and it will go back to the previous activity but when I press the back button in Android using Titanium it exits from the application.

How can I change this behaviour?

Drawback answered 17/12, 2011 at 11:27 Comment(0)
D
11

There are two types of windows like, lightweight and heavyweight. If you create a lightweight window in Titanium android than on back button press it will exist from your application.

You can achieve what you want by creating heavyweight window. You can create heavyweight window in titanium by open it as modal window. So put the parameter modal:true when you create a new window. New window will be created as modal window (heavyweight window for titanium android). And then after if you will press back button it will not exit from application.

Drews answered 17/12, 2011 at 11:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.