<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/contact_wrapper"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ScrollView
        android:id="@+id/contact_scrollview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="gone">

        <RelativeLayout
            android:id="@+id/contact_holder"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="@dimen/normal_margin"
            android:paddingTop="@dimen/activity_margin"
            android:paddingRight="@dimen/normal_margin"
            android:paddingBottom="@dimen/medium_margin">

            <ImageView
                android:id="@+id/contact_photo"
                android:layout_width="@dimen/contact_photo_size"
                android:layout_height="@dimen/contact_photo_size"
                android:layout_marginBottom="@dimen/normal_margin" />

            <ImageView
                android:id="@+id/contact_toggle_favorite"
                android:layout_width="@dimen/contact_actions_size"
                android:layout_height="@dimen/contact_actions_size"
                android:layout_alignTop="@+id/contact_photo"
                android:layout_alignBottom="@id/contact_photo"
                android:layout_marginStart="@dimen/medium_margin"
                android:layout_toEndOf="@+id/contact_photo"
                android:adjustViewBounds="true"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:padding="@dimen/tiny_margin"
                android:src="@drawable/ic_star_off_vector"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_actions_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignTop="@+id/contact_photo"
                android:layout_alignBottom="@id/contact_photo"
                android:gravity="center_vertical|end">

                <ImageView
                    android:id="@+id/contact_send_email"
                    android:layout_width="@dimen/contact_actions_size"
                    android:layout_height="@dimen/contact_actions_size"
                    android:adjustViewBounds="true"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:paddingLeft="@dimen/small_margin"
                    android:paddingRight="@dimen/small_margin"
                    android:scaleType="fitCenter"
                    android:src="@drawable/ic_email_vector" />

                <ImageView
                    android:id="@+id/contact_start_call"
                    android:layout_width="@dimen/contact_actions_size"
                    android:layout_height="@dimen/contact_actions_size"
                    android:layout_marginStart="@dimen/normal_margin"
                    android:adjustViewBounds="true"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:paddingLeft="@dimen/small_margin"
                    android:paddingRight="@dimen/small_margin"
                    android:scaleType="fitCenter"
                    android:src="@drawable/ic_phone_vector" />

                <ImageView
                    android:id="@+id/contact_send_sms"
                    android:layout_width="@dimen/contact_actions_size"
                    android:layout_height="@dimen/contact_actions_size"
                    android:layout_marginStart="@dimen/normal_margin"
                    android:adjustViewBounds="true"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:paddingLeft="@dimen/small_margin"
                    android:paddingRight="@dimen/small_margin"
                    android:scaleType="fitCenter"
                    android:src="@drawable/ic_sms_vector" />

            </LinearLayout>

            <ImageView
                android:id="@+id/contact_name_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_below="@+id/contact_photo"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_person_vector" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_prefix"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_photo"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_name_image"
                android:background="?attr/selectableItemBackground"
                android:lines="1"
                android:maxLines="1"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:singleLine="true"
                android:textSize="@dimen/bigger_text_size" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_first_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_prefix"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_name_image"
                android:background="?attr/selectableItemBackground"
                android:lines="1"
                android:maxLines="1"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:singleLine="true"
                android:textSize="@dimen/bigger_text_size" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_middle_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_first_name"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_name_image"
                android:background="?attr/selectableItemBackground"
                android:lines="1"
                android:maxLines="1"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:singleLine="true"
                android:textSize="@dimen/bigger_text_size" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_surname"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_middle_name"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_name_image"
                android:background="?attr/selectableItemBackground"
                android:lines="1"
                android:maxLines="1"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:singleLine="true"
                android:textSize="@dimen/bigger_text_size" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_suffix"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_surname"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_name_image"
                android:background="?attr/selectableItemBackground"
                android:lines="1"
                android:maxLines="1"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:singleLine="true"
                android:textSize="@dimen/bigger_text_size" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_nickname"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_suffix"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_name_image"
                android:background="?attr/selectableItemBackground"
                android:lines="1"
                android:maxLines="1"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:singleLine="true"
                android:textSize="@dimen/bigger_text_size" />

            <ImageView
                android:id="@+id/contact_numbers_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_numbers_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_phone_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_emails_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_emails_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_email_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_addresses_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_addresses_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_place_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_ims_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_ims_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_im"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_events_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_events_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_cake_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_notes_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_notes"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_label_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_organization_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_organization_company"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_business_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_websites_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_websites_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_link_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_groups_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_groups_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_people_vector"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/contact_source_image"
                android:layout_width="@dimen/contact_icons_size"
                android:layout_height="@dimen/contact_icons_size"
                android:layout_alignTop="@+id/contact_sources_holder"
                android:paddingTop="@dimen/medium_margin"
                android:paddingEnd="@dimen/small_margin"
                android:paddingBottom="@dimen/small_margin"
                android:src="@drawable/ic_account_box_vector"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_numbers_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_nickname"
                android:layout_toEndOf="@+id/contact_numbers_image"
                android:orientation="vertical"
                android:paddingStart="@dimen/small_margin"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_emails_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_numbers_holder"
                android:layout_toEndOf="@+id/contact_name_image"
                android:orientation="vertical"
                android:paddingStart="@dimen/small_margin"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_addresses_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_emails_holder"
                android:layout_toEndOf="@+id/contact_name_image"
                android:orientation="vertical"
                android:paddingStart="@dimen/small_margin"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_ims_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_addresses_holder"
                android:layout_toEndOf="@+id/contact_name_image"
                android:orientation="vertical"
                android:paddingStart="@dimen/small_margin"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_events_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_ims_holder"
                android:layout_toEndOf="@+id/contact_name_image"
                android:orientation="vertical"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_websites_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_organization_job_position"
                android:layout_toEndOf="@+id/contact_name_image"
                android:orientation="vertical"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_groups_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_websites_holder"
                android:layout_toEndOf="@+id/contact_name_image"
                android:orientation="vertical"
                android:paddingStart="@dimen/small_margin"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/contact_sources_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_groups_holder"
                android:layout_toEndOf="@+id/contact_name_image"
                android:orientation="vertical"
                android:paddingStart="@dimen/small_margin"
                android:visibility="gone" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_notes"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_events_holder"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_notes_image"
                android:background="?attr/selectableItemBackground"
                android:lineSpacingExtra="@dimen/medium_margin"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:textSize="@dimen/bigger_text_size"
                android:visibility="gone" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_organization_company"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_notes"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_organization_image"
                android:background="?attr/selectableItemBackground"
                android:lineSpacingExtra="@dimen/medium_margin"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:textSize="@dimen/bigger_text_size"
                android:visibility="gone" />

            <com.simplemobiletools.commons.views.MyTextView
                android:id="@+id/contact_organization_job_position"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@+id/contact_organization_company"
                android:layout_centerVertical="true"
                android:layout_toEndOf="@+id/contact_organization_image"
                android:background="?attr/selectableItemBackground"
                android:lineSpacingExtra="@dimen/medium_margin"
                android:paddingStart="@dimen/small_margin"
                android:paddingTop="@dimen/normal_margin"
                android:paddingBottom="@dimen/normal_margin"
                android:textSize="@dimen/bigger_text_size"
                android:visibility="gone" />

        </RelativeLayout>
    </ScrollView>

    <ImageView
        android:id="@+id/contact_photo_big"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:alpha="0"
        android:background="#88000000"
        android:clickable="true"
        android:padding="@dimen/activity_margin"
        android:scaleType="fitCenter"
        android:src="@drawable/img_write_storage"
        android:visibility="gone" />

</RelativeLayout>
