<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013, Redsolution LTD. All rights reserved.

     This file is part of Xabber project; you can redistribute it and/or
     modify it under the terms of the GNU General Public License, Version 3.

     Xabber is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     See the GNU General Public License for more details.

     You should have received a copy of the GNU General Public License,
     along with this program. If not, see http://www.gnu.org/licenses/.
-->

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="@dimen/contact_list_item_height"
    android:elevation="1dp"
    android:background="@color/grey_300"
>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:gravity="center_vertical"
        android:paddingRight="@dimen/active_chat_padding_right"
        >
        <ImageView
            android:id="@+id/color"

            android:layout_width="4dp"
            android:layout_height="@dimen/avatar_size_toolbar"
            android:layout_marginLeft="2dp"
            android:layout_marginStart="2dp"

            android:layout_marginRight="2dp"
            android:layout_marginEnd="2dp"
            android:src="@color/green_500"
            />

        <ImageView
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/avatar"
            android:layout_width="@dimen/avatar_size_toolbar"
            android:layout_height="@dimen/avatar_size_toolbar"
            android:layout_toRightOf="@id/color"
            android:src="@drawable/ic_avatar_1"
            />

        <RelativeLayout
            android:id="@+id/panel"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:paddingLeft="@dimen/active_chat_padding_left"
            >
            <ImageView
                android:id="@+id/client_software"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentBottom="true"
                android:layout_alignParentRight="true"
                android:layout_alignParentEnd="true"
                android:paddingRight="16dp"
                android:paddingEnd="16dp"
                android:src="@drawable/ic_client"
                android:alpha="0.05"
                />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical"
                android:gravity="center_vertical"
                >

                <TextView
                    android:id="@+id/name"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="bottom"
                    android:singleLine="true"
                    android:ellipsize="marquee"
                    android:text="name"
                    android:textColor="?android:attr/textColorPrimary"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textStyle="bold"
                    />
                <TextView
                    android:id="@+id/status"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="top"
                    android:singleLine="true"
                    android:ellipsize="marquee"
                    android:text="status"
                    android:visibility="visible"
                    android:textColor="?android:attr/textColorSecondary"
                    />

            </LinearLayout>
        </RelativeLayout>

        <ImageView
            android:id="@+id/status_icon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_status"
            />
    </LinearLayout>

<View
    android:layout_width="match_parent"
    android:layout_height="1px"
    android:background="@color/grey_400"
    android:layout_alignParentBottom="true"
    />

    <include layout="@layout/offline_shadow" />

</RelativeLayout>