0

My Application uses an Activity (extends AppCompatActivity) with a ListView. The title-row shows a title and a back-arrow.

A ContextualActionBar is assigned to the ListView. When the ContextualActionBar gets active, because a long click to one item of the ListView, the back-arrow should be removed.

Please, could anybody give a hint, how to remove the back-arrow of the ContextualActionBar?

Thank You very much!

Best Regards

Uli

Uli F.
  • 9
  • 2

1 Answers1

0

It's not really recommended to remove the back arrow, but you can assign it to a transparent drawable

<style name="MyCustomTheme" parent="MyTheme">
    <item name="android:actionModeCloseDrawable">@drawable/transparent_drawable</item>
</style>

Where transparent drawable is :

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

    <solid android:color="#00FFFFFF"/>

</shape>

and then set it in your manifest

<activity
    android:name="MyActivity"
    android:theme="@style/MyCustomTheme"
Niko Adrianus Yuwono
  • 11,012
  • 8
  • 42
  • 64