Facebook
From Hamimah Ismail, 6 Years ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 216
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.v7.widget.CardView
  3.     xmlns:android="http://schemas.android.com/apk/res/android"
  4.     xmlns:app="http://schemas.android.com/apk/res-auto"
  5.     android:layout_width="match_parent"
  6.     android:layout_height="200dp"
  7.     app:cardElevation="4dp"
  8.     android:layout_marginBottom="8dp"
  9.     >
  10.  
  11.     <RelativeLayout
  12.         android:layout_width="match_parent"
  13.         android:layout_height="match_parent">
  14.  
  15.  
  16.         <ImageView
  17.             android:id="@+id/food_image"
  18.             android:scaleType="centerCrop"
  19.             android:src="@drawable/food"
  20.             android:layout_width="match_parent"
  21.             android:layout_height="match_parent" />
  22.  
  23.         <TextView
  24.             android:id="@+id/food_name"
  25.             android:text="Name of Food"
  26.             android:textColor="@android:color/white"
  27.             android:background="@color/overlaybackground"
  28.             android:gravity="center"
  29.             android:textSize="20sp"
  30.             android:layout_alignParentBottom="true"
  31.             android:layout_width="match_parent"
  32.             android:layout_height="wrap_content" />
  33.  
  34.  
  35.     </RelativeLayout>
  36.  
  37. </android.support.v7.widget.CardView>