I have DrawerParent class which is basically a drawer. And, say, two activities inherited from DrawerParent. What I want is to not re-open same activity if it is already running. For such thing I need to somehow check whether this activity is running or not. It works like this in drawer:
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.nav_about) {
startActivity(new Intent(this, AboutActivity.class));
finish();
} else ...
And I don't know how to check it. Thank you.
== Edit ==
Making group in layout and adding selectable="single" not works.