<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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.
-->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.android.contacts.widget.InterpolatingLayout
        android:id="@+id/main_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:splitMotionEvents="true">

        <FrameLayout
            android:id="@+id/browse_view"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:minWidth="100dip"
            ex:layout_narrowParentWidth="1000dip"
            ex:layout_narrowWidth="276dip"
            ex:layout_wideParentWidth="1280dip"
            ex:layout_wideWidth="376dip"
            android:background="@drawable/list_background_holo"
            android:visibility="gone">

            <!-- All -->
            <fragment
                android:id="@+id/all_fragment"
                class="com.android.contacts.list.DefaultContactBrowseListFragment"
                android:layout_height="match_parent"
                android:layout_width="match_parent" />

            <!-- Groups -->
            <fragment
                android:id="@+id/groups_fragment"
                class="com.android.contacts.group.GroupBrowseListFragment"
                android:layout_height="match_parent"
                android:layout_width="match_parent" />
        </FrameLayout>

        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/contact_details_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            ex:layout_narrowParentWidth="800dip"
            ex:layout_narrowMarginLeft="0dip"
            ex:layout_narrowMarginRight="0dip"
            ex:layout_wideParentWidth="1280dip"
            ex:layout_wideMarginLeft="0dip"
            ex:layout_wideMarginRight="0dip"
            android:visibility="gone">

            <!-- This layout includes all possible views needed for a contact detail page -->
            <include
                android:id="@+id/contact_detail_container"
                layout="@layout/contact_detail_container"
                android:layout_width="match_parent"
                android:layout_height="match_parent"/>

            <!-- This invisible worker fragment loads the contact's details -->
            <fragment
                android:id="@+id/contact_detail_loader_fragment"
                class="com.android.contacts.detail.ContactLoaderFragment"
                android:layout_height="0dip"
                android:layout_width="0dip"
                android:visibility="gone"/>
        </view>

        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/group_details_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            ex:layout_narrowParentWidth="800dip"
            ex:layout_narrowMarginLeft="0dip"
            ex:layout_narrowMarginRight="0dip"
            ex:layout_wideParentWidth="1280dip"
            ex:layout_wideMarginLeft="0dip"
            ex:layout_wideMarginRight="0dip"
            android:visibility="gone">

            <!-- This is the group detail page -->
            <fragment
                android:id="@+id/group_detail_fragment"
                class="com.android.contacts.group.GroupDetailFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="gone" />
        </view>

        <LinearLayout
            android:id="@+id/favorites_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/list_background_holo"
            android:baselineAligned="false">

            <!-- Starred -->
            <FrameLayout
                android:layout_width="0dip"
                android:layout_height="match_parent"
                android:layout_weight="7"
                android:background="@drawable/panel_favorites_holo_light">

                <fragment
                    android:id="@+id/favorites_fragment"
                    class="com.android.contacts.list.ContactTileListFragment"
                    android:layout_height="match_parent"
                    android:layout_width="match_parent"
                    android:layout_marginRight="32dip"
                    android:layout_marginLeft="32dip"/>

            </FrameLayout>

            <!-- Most Frequent -->
            <fragment
                android:id="@+id/frequent_fragment"
                class="com.android.contacts.list.ContactTileFrequentFragment"
                android:layout_width="0dip"
                android:layout_height="match_parent"
                android:layout_weight="3"
                android:layout_marginTop="32dip"
                android:layout_marginRight="16dip"/>

        </LinearLayout>

    </com.android.contacts.widget.InterpolatingLayout>

    <com.android.contacts.widget.InterpolatingLayout
        android:id="@+id/contacts_unavailable_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <FrameLayout
            android:id="@+id/contacts_unavailable_container"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            ex:layout_narrowParentWidth="800dip"
            ex:layout_narrowMarginLeft="80dip"
            ex:layout_narrowMarginRight="80dip"
            ex:layout_wideParentWidth="1280dip"
            ex:layout_wideMarginLeft="200dip"
            ex:layout_wideMarginRight="200dip"
            android:paddingBottom="20dip" />

    </com.android.contacts.widget.InterpolatingLayout>
</FrameLayout>