Skip to content

Instantly share code, notes, and snippets.

@nuuneoi
Created February 16, 2016 19:53
Show Gist options
  • Save nuuneoi/df4690ab3eebb416353d to your computer and use it in GitHub Desktop.
Save nuuneoi/df4690ab3eebb416353d to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardElevation="4dp"
card_view:cardUseCompatPadding="true"
android:layout_marginBottom="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/imvPhoto"
android:layout_width="match_parent"
android:layout_height="0dp"
android:src="@drawable/ic_launcher"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:layout_weight="1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="#000080"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/tvNewstitle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxLines="2"
android:ellipsize="end"
android:text="Name Name Name Name Name Name Name Name Name Name Name Name Name"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
@oatpano
Copy link

oatpano commented Feb 17, 2016

ขอบคุณครับ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment