<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2013 The Android Open Source Project

  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.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="?android:attr/listPreferredItemHeight"
                style="@style/listViewActivatedStyle">

    <!-- Use standard android.R class icon id instead of app specific id. This is just useful for
         consistency. Use scaleType=centerCrop to give a nice full cropped image in the assigned
         space -->
    <QuickContactBadge android:id="@android:id/icon"
                       android:layout_height="?android:attr/listPreferredItemHeight"
                       android:layout_width="?android:attr/listPreferredItemHeight"
                       android:scaleType="centerCrop"
                       style="@style/quickContactBadgeStyle"
                       android:src="@drawable/ic_contact_picture_holo_light"/>

    <!-- Use standard android.R class text2 id instead of app specific id. This is just useful for
         consistency. This is secondary text and not always visible so by default is has its
         visibility set to gone -->
    <TextView android:id="@android:id/text2"
              android:paddingLeft="@dimen/listview_item_padding"
              android:paddingRight="@dimen/listview_item_padding"
              android:layout_width="match_parent"
              android:layout_height="26dp"
              android:layout_toRightOf="@android:id/icon"
              android:layout_alignParentBottom="true"
              android:layout_alignParentRight="true"
              android:fontFamily="sans-serif"
              android:singleLine="true"
              android:ellipsize="marquee"
              android:visibility="gone"
              android:text="@string/search_match_other"
              android:textAppearance="?android:attr/textAppearanceSmall"/>

    <!-- Use standard android.R class text1 id instead of app specific id. This is just useful for
         consistency. This view also sets layout_alignWithParentIfMissing=true which lets the view
         align with the parent view if the text2 view is not part of the view hierarchy (which is
         its initial state). -->
    <TextView android:id="@android:id/text1"
              android:paddingLeft="@dimen/listview_item_padding"
              android:paddingRight="@dimen/listview_item_padding"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_above="@android:id/text2"
              android:layout_toRightOf="@android:id/icon"
              android:gravity="center_vertical"
              android:layout_alignParentRight="true"
              android:layout_alignParentTop="true"
              android:layout_alignWithParentIfMissing="true"
              android:fontFamily="sans-serif-light"
              android:singleLine="true"
              android:ellipsize="marquee"
              android:textAppearance="?android:attr/textAppearanceLarge"/>

</RelativeLayout>
