use of com.example.flashgig.fragments.ProfileEditFragment in project FIREBASE_TEST_JAVA by essantos8.
the class MainActivity method onBackPressed.
@Override
public void onBackPressed() {
Fragment curFragment = getSupportFragmentManager().findFragmentById(R.id.frameLayout);
if (curFragment instanceof DetailFragment || curFragment instanceof JobAdderFragment || curFragment instanceof ProfileEditFragment) {
super.onBackPressed();
return;
}
SearchView searchBar = findViewById(R.id.searchviewHome);
if (searchBar != null) {
if (!searchBar.isIconified()) {
searchBar.setIconified(true);
searchBar.onActionViewCollapsed();
return;
}
}
this.moveTaskToBack(true);
}
Aggregations