Maybe this helps you
@Override
public void onBackPressed() {
Intent gBack = new Intent(getActivity(),MainActivity.class);
startActivity(gBack);
}
Maybe this helps you
@Override
public void onBackPressed() {
Intent gBack = new Intent(getActivity(),MainActivity.class);
startActivity(gBack);
}