Created
November 14, 2018 10:42
-
-
Save valentineRutto/bafbdda9fa9848111a6aa6f505e83eaa to your computer and use it in GitHub Desktop.
card overlapping views
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.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<android.support.design.widget.AppBarLayout | |
android:id="@+id/appBar" | |
android:layout_width="match_parent" | |
android:layout_height="250dp" | |
> | |
<android.support.design.widget.CollapsingToolbarLayout | |
android:id="@+id/toolbarlayout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:id="@+id/image" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:src="@drawable/quotes" | |
android:scaleType="centerCrop"/> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/tool" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
app:layout_collapseMode="parallax"/> | |
</android.support.design.widget.CollapsingToolbarLayout> | |
</android.support.design.widget.AppBarLayout> | |
<android.support.v4.widget.NestedScrollView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@color/colorWhite" | |
app:layout_behavior="@string/appbar_scrolling_view_behavior" | |
/> | |
<android.support.v7.widget.CardView | |
android:layout_width="match_parent" | |
android:layout_height="100dp" | |
android:layout_marginRight="32dp" | |
android:layout_marginLeft="32dp" | |
app:layout_anchor="@id/appBar" | |
app:layout_anchorGravity="bottom|center" | |
app:cardElevation="@dimen/small_padding" | |
/> | |
</android.support.design.widget.CoordinatorLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment