Reputation: 23025
I am an android beginner, and I have no android phone.
I am creating an android application, which contains 2 screens. I need to know how to come back, when I am in the 2nd screen. Do I have to specifically program a button in the xml file and code it or, can the user click the phone's back button to come back? (without any code) Or else, can the user slide it to the left side, so it will come back? (without any code).
Please help
Upvotes: 1
Views: 111
Reputation: 13331
can the user click the phone's back button to come back? (without any code)
Yes. All Android phones have a back-button implemented for this purpose.
Do I have to specifically program a button in the xml file and code it
You don't have to, but it is a possibility (although not recommended in most cases)
Or else, can the user slide it to the left side, so it will come back? (without any code).
Normally no. Perhaps if you use a special kind of layout/activity that supports this as a built-in feature. I do not know of any that implements this though.
Upvotes: 4