Go back from an activity to the selected fragment

0

I find myself doing an application in Android Studio and I get this problem that I will narrate in images:

When should I go back to fragment of "Collections", that of the RecyclerView

The code of the toolbar is in the problematic activity is:

     setSupportActionBar(toolbar);
     getSupportActionBar().setDisplayHomeAsUpEnabled(true);

And the manifest of that activity is:

 <activity
        android:name=".Activities.WordsActivity"
        android:parentActivityName=".Activities.MainActivity">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"

            android:value=".Activities.MainActivity" />
    </activity>

However, if I press to go backwards from the bottom bar button to go back if it goes to the corresponding fragment

PD: API 26

Thank you very much

    
asked by Karveg 14.07.2018 в 03:23
source

0 answers