Last active
April 4, 2018 10:40
-
-
Save andriihomiak/e36851de726d320ba0c32c09d8a06908 to your computer and use it in GitHub Desktop.
Need to set appbarlayout elevation to 1dp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout ... | |
> | |
<android.support.design.widget.CoordinatorLayout | |
... | |
> | |
<android.support.design.widget.AppBarLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
> | |
<!-- | |
app:elevation="1dp" remove elevation entirely, | |
but without it elevation is default --> | |
<include layout="@layout/toolbar_center_title" /> | |
</android.support.design.widget.AppBarLayout> | |
<RecyclerView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" | |
... | |
/> | |
</android.support.design.widget.CoordinatorLayout> | |
<android.support.v7.widget.CardView | |
android:id="@+id/input_wrapper" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_alignParentBottom="true" | |
... | |
> | |
... | |
</android.support.v7.widget.CardView> | |
</RelativeLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
android:background="@android:color/white" | |
android:elevation="1dp" | |
app:elevation="1dp" | |
app:layout_scrollFlags="scroll"> | |
<RelativeLayout | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center" | |
android:layout_margin="12dp"> | |
<TextView | |
android:id="@+id/toolbar_title" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:maxLines="1" | |
android:maxLength="30" | |
android:ellipsize="end" | |
android:textColor="@android:color/black" | |
style="@style/TextAppearance.Widget.AppCompat.Toolbar.Title" /> | |
<ImageView | |
android:id="@+id/check_mark" | |
android:visibility="gone" | |
android:src="@drawable/ic_verify" | |
android:layout_toRightOf="@+id/toolbar_title" | |
android:layout_alignBottom="@id/toolbar_title" | |
android:layout_alignTop="@id/toolbar_title" | |
android:layout_marginLeft="2dp" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" /> | |
</RelativeLayout> | |
</android.support.v7.widget.Toolbar> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment