Reputation: 4002
I notice this type of toolbar used in recent apps on PlayStore, and I need to achieve this.
I know how to create a simple toolbar in XML.
Simple Toolbar
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:background="@color/ColorPrimary"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
android:theme="@style/about_toolbar"
>
...
</android.support.v7.widget.Toolbar>
I seems like a toolbar with padding.
So I'm not entirely sure. Please can someone who has done this help me out !
Upvotes: 1
Views: 115
Reputation: 2529
Example with cardView:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#bcbcbc"
>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentTop="true"
android:layout_margin="20dp"
android:background="@android:drawable/dialog_holo_light_frame"
/>
</RelativeLayout>
Upvotes: 2