In my app a make button which is function to open item which has been open
before that-back button...but i whant to implement that function in button on
android phone...button looks like arrow...

In your the activity you launch from your first button:

@Override
public void onBackPressed()
{
   // Close this activity...
}

(requires API level 5 or higher)

or

@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
   if (keyCode == KeyEvent.KEYCODE_BACK)
   {
       // Close this activity...
       return true;
   }
   return super.onKeyDown(keyCode, event);
}



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