coolbud012

Layout

Dec 13th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.69 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="wrap_content"
  7.    android:orientation="vertical">
  8.  
  9.     <ImageView
  10.        android:id="@+id/iv_background"
  11.        android:layout_width="0dp"
  12.        android:layout_height="0dp"
  13.        android:layout_marginTop="@dimen/dimen_8"
  14.        android:scaleType="centerCrop"
  15.        app:layout_constraintLeft_toLeftOf="parent"
  16.        app:layout_constraintRight_toRightOf="parent"
  17.        app:layout_constraintTop_toTopOf="parent"
  18.        android:src="@mipmap/ic_launcher" />
  19.  
  20.     <TextView
  21.        android:id="@+id/tv_rating"
  22.        android:layout_width="0dp"
  23.        android:layout_height="0dp"
  24.        android:layout_marginStart="@dimen/dimen_16"
  25.        android:layout_marginTop="@dimen/dimen_16"
  26.        android:paddingBottom="@dimen/dimen_4"
  27.        android:paddingLeft="@dimen/dimen_6"
  28.        android:paddingRight="@dimen/dimen_6"
  29.        android:paddingTop="@dimen/dimen_4"
  30.        android:textColor="@color/white"
  31.        android:textSize="@dimen/dimen_16"
  32.        app:layout_constraintLeft_toLeftOf="@+id/iv_background"
  33.        app:layout_constraintTop_toTopOf="parent"
  34.        tools:text="4.4" />
  35.  
  36.     <TextView
  37.        android:id="@+id/tv_restaurant_name"
  38.        android:layout_width="0dp"
  39.        android:layout_height="0dp"
  40.        android:layout_marginBottom="40dp"
  41.        android:layout_marginEnd="16dp"
  42.        android:layout_marginStart="@dimen/dimen_16"
  43.        android:layout_marginTop="@dimen/dimen_28"
  44.        android:ellipsize="end"
  45.        android:gravity="center"
  46.        android:maxWidth="250dp"
  47.        android:paddingBottom="@dimen/dimen_3"
  48.        android:paddingLeft="@dimen/dimen_8"
  49.        android:paddingRight="@dimen/dimen_8"
  50.        android:paddingTop="@dimen/dimen_3"
  51.        android:singleLine="true"
  52.        android:textColor="@color/white"
  53.        android:textSize="@dimen/font_15"
  54.        android:textStyle="bold"
  55.        app:layout_constraintBottom_toBottomOf="@+id/iv_background"
  56.        app:layout_constraintHorizontal_bias="0.0"
  57.        app:layout_constraintLeft_toLeftOf="parent"
  58.        app:layout_constraintRight_toLeftOf="@+id/iv_thumbs_down"
  59.        app:layout_constraintTop_toBottomOf="@+id/tv_rating"
  60.        tools:text="This is a very very" />
  61.  
  62.     <TextView
  63.        android:id="@+id/tv_restaurant_address"
  64.        android:layout_width="0dp"
  65.        android:layout_height="0dp"
  66.        android:layout_marginBottom="@dimen/dimen_16"
  67.        android:layout_marginEnd="16dp"
  68.        android:layout_marginStart="@dimen/dimen_16"
  69.        android:layout_marginTop="@dimen/dimen_16"
  70.        android:ellipsize="end"
  71.        android:gravity="center"
  72.        android:maxWidth="200dp"
  73.        android:paddingBottom="@dimen/dimen_3"
  74.        android:paddingLeft="@dimen/dimen_8"
  75.        android:paddingRight="@dimen/dimen_8"
  76.        android:paddingTop="@dimen/dimen_3"
  77.        android:singleLine="true"
  78.        android:textColor="@color/white"
  79.        android:textSize="@dimen/font_12"
  80.        app:layout_constraintBottom_toBottomOf="@+id/iv_background"
  81.        app:layout_constraintHorizontal_bias="0.0"
  82.        app:layout_constraintLeft_toLeftOf="parent"
  83.        app:layout_constraintRight_toLeftOf="@+id/tv_distance"
  84.        app:layout_constraintTop_toBottomOf="@+id/tv_restaurant_name"
  85.        tools:text="Restaurant Address" />
  86.  
  87.     <ImageView
  88.        android:id="@+id/iv_thumbs_down"
  89.        android:layout_width="0dp"
  90.        android:layout_height="0dp"
  91.        android:layout_marginEnd="@dimen/dimen_16"
  92.        android:layout_marginTop="@dimen/dimen_16"
  93.        android:padding="@dimen/dimen_8"
  94.        app:layout_constraintRight_toRightOf="@+id/iv_background"
  95.        app:layout_constraintTop_toTopOf="parent"
  96.        android:src="@drawable/ic_thumb_down" />
  97.  
  98.     <TextView
  99.        android:id="@+id/tv_distance"
  100.        android:layout_width="0dp"
  101.        android:layout_height="0dp"
  102.        android:layout_marginEnd="16dp"
  103.        android:layout_marginTop="40dp"
  104.        android:paddingBottom="@dimen/dimen_3"
  105.        android:paddingLeft="@dimen/dimen_8"
  106.        android:paddingRight="@dimen/dimen_8"
  107.        android:paddingTop="@dimen/dimen_3"
  108.        android:textColor="@color/white"
  109.        android:textSize="@dimen/font_12"
  110.        app:layout_constraintRight_toRightOf="parent"
  111.        app:layout_constraintTop_toBottomOf="@+id/iv_thumbs_down"
  112.        tools:text="1.2kms" />
  113.  
  114. </android.support.constraint.ConstraintLayout>
Add Comment
Please, Sign In to add comment