Hello. In general, there are 3 Activities: A, B, C and the order of their call: A-> B-> C. So, when you go back from activity C, you need to get right into activity A.

UPD Activity B should not go to BackStack

    1 answer 1

    toolbar.setNavigationOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v){ Intent intent = new Intent(C.this, A.class); startActivity(intent); finish(); } }); 
    • a little bit wrong, I have to go back from C to A by pressing the Back (on the toolbar or the system button), that is, so that Activity B does not go to BackStack - Artur
    • @Artur, redefine onBackPressed in C. Run A. In it, launch A. On pressing the arrow, call onBackPressed - YuriiSPb
    • did almost as advised, only when creating a C called up finish () in B - Artur