Hello,

Let OS kill the application. see these
http://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon

http://stackoverflow.com/questions/5100728/how-to-force-stop-my-android-application-programatically

http://stackoverflow.com/questions/6330200/how-to-quit-android-application-programmatically


When you press back the current activity is automatically finish and
removed from stack, so when you start same activity only one instance will
be there. You dont need to finish activity programmatically yourself when
you press back, Os does that.


On Mon, Aug 27, 2012 at 3:44 PM, Haris <[email protected]> wrote:

>
>
> Hai all
>
>   For my application I am using more than one layout, and I nedd to switch
> from layout to layout  ....
> I think there are two methods for this.
>
> 1. Using setContentView switch to new layout.
> 2. Or by creating new activity switch to new layout.
>
> Now I am following the second one...And its working perfectly.......
>
> So which one I should use for my application...?
>
> And also for go back to the previous layout I am just pressing the back
> button.....Do I need to call the finish() method....Or the android do it
> automatically..........
>
> And I noticed that when close the application by calling finish() the
> program is exiting. But In Application->mange application it showing an
> option for "force stop"..
>
> Is there any method to  exit  application properly ?.........
>
> Thanks..............
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thanks & Regards,
Renuka

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to