0

Programmatically it can be achieve by actionBar.setDisplayHomeAsUpEnabled(true);

Is there a way to set it in the app theme xml eg

<style name="Theme.FooBar" parent="@android:style/Theme.Material.Light">
        <!-- Primary brand color. -->
        <item name="android:colorPrimary">@color/cerulean</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor">@color/cerulean_blue</item>
        <!-- Customize your theme here. -->
        <item name="android:homeAsUpIndicator">@drawable/menu</item>
        <item name="android:textColorPrimary">@android:color/white</item>

        <>set it here<>
</style>
Bret Joseph
  • 401
  • 3
  • 13
  • The last code block in [this question](https://stackoverflow.com/q/26732952) shows how to do it, though if you are really using a platform theme and `Activity`, you need to use the corresponding platform attributes and style; i.e., `"android:actionBarStyle"`, `"android:displayOptions"`, and `"android:Widget.Material.ActionBar"`. – Mike M. Mar 06 '22 at 06:21
  • This seems like what I'm looking for I will try creating a style for android.widget.material.action bar – Bret Joseph Mar 06 '22 at 06:43
  • It seems platform doesn't have android:displayOptions – Bret Joseph Mar 06 '22 at 07:17
  • How do you mean? Seems to resolve just fine for me: https://i.stack.imgur.com/I8P62.png. – Mike M. Mar 06 '22 at 07:20
  • Ok it was my bad it works fine – Bret Joseph Mar 06 '22 at 07:26
  • And to not lose color inherit parent Widget.Material.Light.ActionBar.Solid – Bret Joseph Mar 06 '22 at 07:41

0 Answers0