sethomebutton listener android

Solutions on MaxInterview for sethomebutton listener android by the best coders in the world

showing results for - "sethomebutton listener android"
Clotilde
23 Feb 2016
1@Override
2public boolean onOptionsItemSelected(MenuItem item) {
3    int id = item.getItemId();
4
5    if (id == android.R.id.home) {
6        onBackPressed();  return true;
7    }
8
9    return super.onOptionsItemSelected(item);
10}
11