Back button without action bar

0

I removed the action bar from a single acitivity. But in my Action bar has the back button. If I remove the action bar logically the button comes out. But I'd like the back button to stay there. Is there any toolbar or something like that where the back button is transparent and stays on? I am designing a detail screen of a customer's registration. Follow the images for better understanding.

XMLCode:

<?xmlversion="1.0" encoding="utf-8"?>

<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/toolbar"

    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/colorPrimary" />

    
asked by anonymous 24.06.2016 / 13:37

2 answers

1

Try the following:
Involve your Toolbar with AppBarLayout

      <android.support.design.widget.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

            // ... Sua ToolBar vai aqui

      </android.support.design.widget.AppBarLayout>

And below the AppBarLayout you add your ListView with the app:layout_behavior="@string/appbar_scrolling_view_behavior" property:

<ListView
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    ...>

 </ListView>
    
24.06.2016 / 22:53
0

Try this code

<android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"      
            android:theme="@style/AppTheme.ActionBar.Transparent"
            app:layout_scrollFlags="scroll|enterAlways"

And in the styles.xml add

<style name="AppTheme.ActionBar.Transparent" parent="AppTheme">
    <item name="colorPrimary">@android:color/transparent</item>
    <item name="colorControlNormal">@color/white</item>
</style>
    
24.06.2016 / 21:08