Answers for "action bar"

0

sethomebutton listener android

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    int id = item.getItemId();

    if (id == android.R.id.home) {
        onBackPressed();  return true;
    }

    return super.onOptionsItemSelected(item);
}
Posted by: Guest on November-21-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language