Xml文件  |  169行  |  6.69 KB

<?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">

    <LinearLayout
        android:id="@+id/main_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:splitMotionEvents="true">

        <LinearLayout
            android:id="@+id/browse_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical"
            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="0dip"
                android:layout_width="match_parent"
                android:layout_weight="1" />

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

        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/details_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/background_primary"
            ex:clipMarginLeft="0dip"
            ex:clipMarginTop="3dip"
            ex:clipMarginRight="3dip"
            ex:clipMarginBottom="9dip"
            ex:enterAnimation="@android:animator/fade_in"
            ex:exitAnimation="@android:animator/fade_out"
            ex:animationDuration="200"
            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"
                android:layout_marginTop="16dip"
                android:layout_marginLeft="16dip"
                android:layout_marginRight="16dip"/>

            <!-- 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"/>

            <!-- 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>

        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/favorites_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            ex:clipMarginLeft="0dip"
            ex:clipMarginTop="3dip"
            ex:clipMarginRight="3dip"
            ex:clipMarginBottom="9dip"
            ex:enterAnimation="@android:animator/fade_in"
            ex:exitAnimation="@android:animator/fade_out"
            ex:animationDuration="200">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/list_background_holo">

                <!-- Starred -->
                <FrameLayout
                    android:layout_width="0dip"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    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_marginTop="32dip"
                        android:layout_marginRight="32dip"
                        android:layout_marginLeft="32dip"/>

                </FrameLayout>

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

            </LinearLayout>
        </view>

    </LinearLayout>

    <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>