moseskarunia

visit_note_timeline

Aug 16th, 2016
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.88 KB | None | 0 0
  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:card_view="http://schemas.android.com/apk/res-auto"
  5.    android:id="@+id/visit_note_timeline"
  6.    android:layout_width="match_parent"
  7.    android:layout_height="wrap_content"
  8.    android:layout_margin="10dp"
  9.    card_view:cardCornerRadius="2dp"
  10.    card_view:cardElevation="@dimen/cardview_default_elevation"
  11.    card_view:cardBackgroundColor="@android:color/black"
  12.    card_view:cardUseCompatPadding="true">
  13.  
  14.     <RelativeLayout
  15.        android:layout_width="match_parent"
  16.        android:layout_height="wrap_content">
  17.         <ImageView
  18.            android:id="@+id/more_button"
  19.            android:layout_width="30dp"
  20.            android:layout_height="30dp"
  21.            android:src="@drawable/ic_more_vert_black_24dp"
  22.            android:layout_alignParentTop="true"
  23.            android:layout_alignParentRight="true"
  24.            android:layout_margin="@dimen/card_view_elements_margin"
  25.            android:onClick="moreButtonClicked" />
  26.  
  27.         <ImageView
  28.            android:id="@+id/profpic"
  29.            android:layout_width="50dp"
  30.            android:layout_height="50dp"
  31.            android:layout_marginTop="@dimen/card_view_elements_margin"
  32.            android:layout_marginLeft="@dimen/card_view_elements_margin"
  33.            android:src="@drawable/profile_img"/>
  34.         <TextView
  35.            android:id="@+id/username"
  36.            android:text="katnisseverdeen"
  37.            android:textSize="@dimen/primary_font_size"
  38.            android:textStyle="bold"
  39.            android:layout_width="wrap_content"
  40.            android:layout_height="wrap_content"
  41.            android:layout_toRightOf="@+id/profpic"
  42.            android:textColor="@android:color/white"
  43.            android:layout_marginTop="@dimen/card_view_elements_margin"
  44.            android:layout_marginLeft="@dimen/card_view_elements_margin"/>
  45.         <TextView
  46.            android:id="@+id/vn_timestamp"
  47.            android:text="less than 1 min ago"
  48.            android:textSize="@dimen/tertiary_font_size"
  49.            android:layout_width="wrap_content"
  50.            android:layout_height="wrap_content"
  51.            android:layout_toRightOf="@+id/profpic"
  52.            android:layout_below="@id/username"
  53.            android:textColor="@android:color/darker_gray"
  54.            android:layout_marginLeft="@dimen/card_view_elements_margin"/>
  55.  
  56.         <TextView
  57.            android:id="@+id/caption_text"
  58.            android:layout_below="@+id/profpic"
  59.            android:text="Two Hands Full"
  60.            android:textSize="@dimen/primary_font_size"
  61.            android:textStyle="bold"
  62.            android:layout_width="wrap_content"
  63.            android:layout_height="wrap_content"
  64.            android:textColor="@android:color/white"
  65.            android:layout_marginTop="@dimen/card_view_elements_margin"
  66.            android:layout_marginLeft="@dimen/card_view_elements_margin"/>
  67.         <TextView
  68.            android:id="@+id/caption_text_2"
  69.            android:layout_below="@id/caption_text"
  70.            android:text="Jl. Sukajadi No 25"
  71.            android:textSize="@dimen/tertiary_font_size"
  72.            android:layout_width="wrap_content"
  73.            android:layout_height="wrap_content"
  74.            android:textColor="@android:color/darker_gray"
  75.            android:layout_marginLeft="@dimen/card_view_elements_margin"/>
  76.  
  77.         <include layout="@layout/ratings_preview"
  78.            android:layout_height="wrap_content"
  79.            android:layout_width="wrap_content"
  80.            android:layout_alignParentRight="true"
  81.            android:layout_marginRight="@dimen/card_view_elements_margin"
  82.            android:layout_alignBottom="@id/caption_text_2"/>
  83.  
  84.         <ImageView
  85.            android:id="@+id/food_pic"
  86.            android:layout_width="match_parent"
  87.            android:layout_height="200dp"
  88.            android:layout_marginTop="@dimen/card_view_elements_margin"
  89.            android:scaleType="centerCrop"
  90.            android:layout_below="@id/caption_text_2"
  91.            android:src="@drawable/food"
  92.            android:contentDescription="Dummy image"
  93.            android:adjustViewBounds="true"/>
  94.  
  95.         <TextView
  96.            android:id="@+id/short_review_text"
  97.            android:layout_width="match_parent"
  98.            android:layout_height="wrap_content"
  99.            android:textSize="@dimen/secondary_font_size"
  100.            android:text="@string/lorem_ipsum"
  101.            android:textColor="@android:color/white"
  102.            android:layout_below="@id/food_pic"
  103.            android:layout_centerHorizontal="true"
  104.            android:layout_margin="@dimen/card_view_elements_margin"/>
  105.  
  106.         <TextView
  107.            android:id="@+id/likecomment"
  108.            android:layout_width="wrap_content"
  109.            android:layout_height="wrap_content"
  110.            android:layout_below="@id/short_review_text"
  111.            android:textColor="@android:color/darker_gray"
  112.            android:textSize="@dimen/tertiary_font_size"
  113.            android:text="10 comments - 10 likes"
  114.            android:layout_marginLeft="@dimen/card_view_elements_margin"
  115.            android:textStyle="bold"/>
  116.  
  117.         <TextView
  118.            android:id="@+id/readmore"
  119.            android:layout_width="wrap_content"
  120.            android:layout_height="wrap_content"
  121.            android:layout_below="@id/likecomment"
  122.            android:textColor="@android:color/darker_gray"
  123.            android:text="read more"
  124.            android:layout_marginRight="@dimen/card_view_elements_margin"
  125.            android:layout_marginBottom="@dimen/card_view_elements_margin"
  126.            android:layout_alignParentRight="true"
  127.            android:textSize="@dimen/tertiary_font_size"
  128.            android:textStyle="bold"/>
  129.     </RelativeLayout>
  130. </android.support.v7.widget.CardView>
Advertisement
Add Comment
Please, Sign In to add comment