I think my question is difficult to understand, but here is a simple example to understand what I want
this method above is created by default when generates a new class extend Activity, can display the menu when in click on the Menu Button in android
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
Log.i("---------------", "----------onCreateOptionsMenu--------------");
return true;
}
my purpose is to create a method such onCreateOptionsMenu, but for the Home Button in Android mobile