In many apps (Calendar, Drive, Play Store) when you tap a button and enter a new activity, the icon in the title bar turns into a back button, but for the app I am making, i
This is working for me.. Suppose there are two activity (Activityone,Activitytwo)
Inside Activitytwo use this code
@Override
protected void onCreate(Bundle savedInstanceState) {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
On Activityone
//when you need to go second activity
startActivity(new Intent(Activityone.this, Activitytwo.class));
This should be included in second activity inside manifest file
And The result would be like this