Skip to content

Instantly share code, notes, and snippets.

@SelvinPL
Last active March 30, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SelvinPL/5b9dde06b024c9bc617dd8a0ec9dc132 to your computer and use it in GitHub Desktop.
Save SelvinPL/5b9dde06b024c9bc617dd8a0ec9dc132 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"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="350dp"
android:layout_margin="10dp"
card_view:cardCornerRadius="10dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/thumbnail_profile"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:padding="5dp"
android:scaleType="centerCrop"
tools:src="@android:drawable/sym_def_app_icon" />
<TextView
android:id="@+id/likes_product"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_alignBottom="@id/thumbnail_profile"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="center_vertical"
tools:text="123" />
<ImageView
android:id="@+id/likes_logo"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_alignBottom="@id/thumbnail_profile"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/likes_product"
android:src="@android:drawable/sym_action_chat" />
<TextView
android:id="@+id/created_by"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:layout_toLeftOf="@id/likes_logo"
android:layout_toRightOf="@id/thumbnail_profile"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="13sp"
android:textStyle="bold"
tools:text="Created by Christoph van Ochten" />
<TextView
android:id="@+id/time_ago"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_below="@id/created_by"
android:layout_toLeftOf="@id/likes_logo"
android:layout_toRightOf="@id/thumbnail_profile"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textSize="10sp"
tools:text="1 month ago" />
<TextView
android:id="@+id/name_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="5dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:singleLine="true"
android:textSize="18sp"
tools:text="Barcelona Chair" />
<TextView
android:id="@+id/brand_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/name_product"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:singleLine="true"
android:textSize="24sp"
tools:text="Mies van der Rohe" />
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="230dp"
android:layout_above="@id/brand_product"
android:layout_below="@+id/thumbnail_profile"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
tools:src="@android:drawable/sym_def_app_icon" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="350dp"
card_view:cardCornerRadius="10dp"
android:layout_margin="10dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/container_top"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="#fff"
android:layout_alignParentTop="true"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/thumbnail_profile"
android:layout_width="50dp"
android:layout_height="50dp"
android:scaleType="centerCrop"
tools:src="@android:drawable/sym_def_app_icon"
android:layout_centerInParent="true"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp">
<TextView
android:id="@+id/created_by"
android:textSize="13sp"
android:textStyle="bold"
tools:text="Created by Christoph van Ochten"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/time_ago"
tools:text="1 month ago"
android:textSize="10sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp">
<ImageView
android:id="@+id/likes_logo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/sym_action_chat"/>
<TextView
android:id="@+id/likes_product"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="123"
android:layout_marginTop="5dp"/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="230dp"
android:layout_centerHorizontal="true"
tools:src="@android:drawable/sym_def_app_icon"
android:layout_below="@+id/container_top"
android:scaleType="centerCrop"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="#fff"
android:layout_alignParentBottom="true">
<TextView
android:id="@+id/brand_product"
android:textSize="24sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_marginLeft="5dp"
tools:text="Mies van der Rohe"
android:layout_alignParentTop="true"/>
<TextView
android:id="@+id/name_product"
android:textSize="18sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
tools:text="Barcelona Chair"
android:layout_marginLeft="5dp"
android:layout_marginBottom="5dp"
android:layout_alignParentBottom="true"/>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</android.support.v7.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment