<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2017 Google Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<android.support.percent.PercentRelativeLayout
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/layout_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingBottom="@dimen/vertical_spacing"
    android:paddingTop="@dimen/vertical_spacing">

    <LinearLayout
        android:id="@+id/layout_profile"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        app:layout_marginEndPercent="@dimen/padding_10"
        app:layout_marginStartPercent="@dimen/padding_10">

        <ImageView
            android:id="@+id/profile_img"
            android:layout_width="@dimen/chat_profile_diameter"
            android:layout_height="@dimen/chat_profile_diameter"
            android:contentDescription="@string/profile_image"
            tools:src="@drawable/ic_face_white_24dp"
            app:layout_marginStartPercent="@dimen/padding_15" />

        <TextView
            android:id="@+id/text_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/keyline_large"
            android:ellipsize="end"
            tools:text="John Doe, Jane Doe, John Doe Jr."
            android:textColor="@color/blue_100"
            android:textSize="@dimen/font_small" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/layout_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/layout_profile"
        android:layout_marginTop="@dimen/keyline_large"
        android:orientation="vertical"
        app:layout_marginEndPercent="@dimen/padding_10"
        app:layout_marginStartPercent="@dimen/padding_10">

        <TextView
            android:id="@+id/text_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/holder_text" />

    </LinearLayout>

    <TextView
        android:id="@+id/text_time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/layout_content"
        android:layout_marginTop="@dimen/keyline_large"
        android:textColor="@color/blue_100"
        android:textSize="@dimen/font_small"
        tools:text="Mar 17 9:15 am"
        app:layout_marginEndPercent="@dimen/padding_10"
        app:layout_marginStartPercent="@dimen/padding_10" />
</android.support.percent.PercentRelativeLayout>