I want to show a Up button in my activity, the functionality is working fine, but am unable to get the left caret to show. It instead shows an ugly back arrow. I am doing this in my activity -
public class SecondActivity extends ActionBarActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
mToolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(mToolbar);
setTitle(getString(R.string.second));
mToolbar.setTitleTextColor(getResources().getColor(android.R.color.white));
....
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
....
}
}
But I am only seeing this -
This is the layout xml -
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.step.main.SecondActivity">
<android.support.v7.widget.RecyclerView
android:id="@+id/listsecond"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="?attr/actionBarSize"
android:clipToPadding="false"
tools:context=".SecondActivity"
/>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"/>
</FrameLayout>
Any suggestions? Also, is there a way to change the color of back button be white?
Note: I am using theme - Theme.AppCompat.Light.NoActionBar