okay thanks for all of your suggestions ...everything is working is fine.

On Thu, Dec 23, 2010 at 4:17 AM, Streets Of Boston
<flyingdutc...@gmail.com>wrote:

> Note that this will work only for phones running 2.0 and up.
> For phones running 1.6 and lower, you need to handle the key-down and
> key-up of the back-key.
>
> On Dec 22, 2:37 pm, Prateek Jain <mrprateekj...@gmail.com> wrote:
> > Hi,
> >
> > If you just want to disable the back button and do nothing, you can
> > try this -
> >
> > @Override
> >         public void onBackPressed()
> >         {
> >              // Your code here, If you wish to write any, else no
> > need. :-)
> >         }
> >
> > Thats it !!!
> >
> > Cheers,
> > Prateek
> >
> > On Dec 22, 5:06 pm, Abhilash baddam
> >
> >
> >
> > <abhilash.androiddevelo...@gmail.com> wrote:
> > > Thanks kostya it's working fine...
> >
> > > On Wed, Dec 22, 2010 at 5:27 PM, Kostya Vasilyev <kmans...@gmail.com>
> wrote:
> > > >  Starting with API level 5, you can override onBackPressed().
> >
> > > > For previous API levels, use something like:
> >
> > > >     @Override
> > > >     public boolean onKeyDown(int keyCode, KeyEvent event) {
> > > >         if (keyCode == KeyEvent.KEYCODE_BACK) {
> > > >                 // your code here
> > > >                 return true;
> > > >         }
> > > >         return super.onKeyDown(keyCode, event);
> > > >     }
> >
> > > > Whether this is a good idea is another question.
> >
> > > > Also note that the user can still use the Home key to leave the
> activty,
> > > > and you can't override that.
> >
> > > > -- Kostya
> >
> > > > 22.12.2010 14:49, vikram jain пишет:
> >
> > > > use back.setVisible(false)
> >
> > > > On Wed, Dec 22, 2010 at 5:18 PM, Abhilash baddam <
> > > > abhilash.androiddevelo...@gmail.com> wrote:
> >
> > > >> Hi friends,
> >
> > > >>                Suppose i have an activity which displays a text like
> > > >> hello..when the user click on back button i don't want
> > > >>          to work that key instead i want to display a toast which
> shows
> > > >> back button not works here . How can we disable that
> > > >>         key programmatically.
> >
> > > >> Any suggestions please...
> >
> > > >>  Regards,
> > > >> Abhilash.B
> > > >> --
> > > >> 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<android-developers%2bunsubscr...@googlegroups.com><android-developers%2Bunsubs
> cr...@googlegroups.com>
> > > >> For more options, visit this group at
> > > >>http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > 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<android-developers%2bunsubscr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > Kostya Vasilyev -- WiFi Manager + pretty widget --
> http://kmansoft.wordpress.com
> >
> > > >  --
> > > > 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<android-developers%2bunsubscr...@googlegroups.com><android-developers%2Bunsubs
> cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> 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<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
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

Reply via email to