[android-developers] Break the execution
Hi How can I stop the execution at one point? For Example if (strUserName.equals()) { Toast.makeText(getBaseContext(), Enter User Name., 10).show(); } Inside this If condition I want to stop the execution and dont let the system to execute rest of the code which I have in bottom. At the same time I want to stay on the same Activity. One thing I can throw exception and do other than that is there any way? -- - Prakash. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Break the execution
use this line android.os.killprocess -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Break the execution
On Fri, Sep 23, 2011 at 6:06 AM, Sivaprakash sivaprakashshanmu...@gmail.com wrote: Inside this If condition I want to stop the execution and dont let the system to execute rest of the code which I have in bottom. That's pretty much the exact purpose of an if condition On Fri, Sep 23, 2011 at 6:10 AM, tamil maran tam.mara...@gmail.com wrote: use this line android.os.killprocess Even discounting the fact the OP stated he wants to stay in the Activity, that's not how you exit an app in Android. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en