Last active
August 29, 2015 14:19
-
-
Save alorma/607a294a4a025bc319cf to your computer and use it in GitHub Desktop.
Example cardview
This file contains hidden or 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
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:card_view="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:card="http://schemas.android.com/apk/res-auto" | |
android:layout_gravity="center" | |
android:layout_width="match_parent" | |
android:layout_height="180dp" | |
android:background="@color/white" | |
card_view:cardCornerRadius="4dp" | |
android:clickable="true" | |
card_view:cardElevation="@dimen/gapSmall" | |
android:layout_margin="@dimen/gapMedium" | |
android:foreground="?android:attr/selectableItemBackground"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<ImageView | |
android:layout_width="match_parent" | |
android:layout_height="160dp" | |
android:id="@+id/image" | |
android:scaleType="fitXY" /> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
style="@style/Base.TextAppearance.AppCompat.Subhead" | |
android:textColor="?attr/colorPrimary" | |
android:id="@+id/text" | |
tools:text="41.23424,1.2424"/> | |
</LinearLayout> | |
</LinearLayout> | |
</android.support.v7.widget.CardView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment