when I create a new activity, Android Studio show me this photo:
It have a Back button but activity haven’t it. how can I Make visible it?
2
put getSupportActionBar().setDisplayHomeAsUpEnabled(true); into onCreate() method in your activity class
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
In manifest declare the activity as a parent activity to get this button like this
<activity android:name="com.owletogroceries.activity.RewardsActivity"/> <activity android:name="OrderConfirmationActivity" android:parentActivityName="ProductActivity"/>
Click here to cancel reply.
2
Answers
put
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
into onCreate() method in your activity classIn manifest declare the activity as a parent activity to get this button like this