I'm trying to use a custom up/back button icon with a different color since I haven't been able to figure out a straight forward way of changing the color of the default android up/back button.
I downloaded a 128x128 back button icon (PNG) and changed it to the color I want, also placed it in my drawable folder. But i have not been able to get it to display, still.
Here's what I tried so far,
In my Styles.xml, I included this:
<style name="customStyle" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarStyle">@style/customActionBarStyle</item>
<item name="android:textColorPrimary">@color/titletextcolor</item>
</style>
<style name="customActionBarStyle" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="background">@drawable/custom</item>
<item name="android:homeAsUpIndicator">@drawable/upbutton</item>
</style>
In my Activity's onCreate, I included this:
getSupportActionBar().setHomeAsUpIndicator(R.drawable.upbutton);
And in the onOptionsItemSelected, I did this:
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
switch (item.getItemId())
{
case android.R.id.home:
finish();
}
return true;
}
Please can anyone help figure out what i'm doing wrong, or what I'm missing? Thanks in advance.