Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76c10116 authored by Maurice Chu's avatar Maurice Chu
Browse files

Made layout fixes to support 7" tablets

Renamed resource directory suffixes for 7" tablets in landscape
orientation from sw580dp-w1000dp to sw580dp-w940dp.

In Group and All panes, the ratio of the left list pane to right detail
pane is 1:2.  Set up a threshold of the minimum width to show images in
the browse list under the All tab and show/hide images appropriately.

Show 3 columns of images in the Group detail pane when the 7" tablet is
in landscape orientation.

Width in left scrollbar for left pane browse list reduced for 7" tablet.

Bug: 6398940
Bug: 6378492
Change-Id: I7730830470e794a59cf7b2b910ae7aadf82b36c6
parent afe795a2
Loading
Loading
Loading
Loading
+161 −0
Original line number Diff line number Diff line
<?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"
        android:baselineAligned="false">

        <!-- Left panel browse list for Groups or All tabs -->
        <FrameLayout
            android:id="@+id/browse_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            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>

        <!-- Right panel detail view for All tab -->
        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/contact_details_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="2"
            android:background="@color/background_primary"
            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_marginLeft="16dip"
                android:layout_marginTop="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"/>
        </view>

        <!-- Right panel detail view for Groups tab -->
        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/group_details_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="2"
            android:background="@color/background_primary"
            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>

        <!-- Two-panel view under the Favorites tab -->
        <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="2"
                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="16dip"
                    android:layout_marginLeft="16dip"/>

            </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="1"
                android:layout_marginTop="16dip"
                android:layout_marginRight="16dip"/>

        </LinearLayout>

    </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>
+6 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
        android:splitMotionEvents="true"
        android:baselineAligned="false">

        <!-- Left panel browse list for Groups or All tabs -->
        <FrameLayout
            android:id="@+id/browse_view"
            android:layout_width="0dip"
@@ -51,12 +52,13 @@
                android:layout_width="match_parent" />
        </FrameLayout>

        <!-- Right panel detail view for All tab -->
        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/contact_details_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:layout_weight="2"
            android:background="@color/background_primary"
            android:visibility="gone">

@@ -79,12 +81,13 @@
                android:visibility="gone"/>
        </view>

        <!-- Right panel detail view for Groups tab -->
        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/group_details_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:layout_weight="2"
            android:background="@color/background_primary"
            android:visibility="gone">

@@ -97,6 +100,7 @@
                android:visibility="gone" />
        </view>

        <!-- Two-panel view under the Favorites tab -->
        <LinearLayout
            android:id="@+id/favorites_view"
            android:layout_width="match_parent"
+161 −0
Original line number Diff line number Diff line
<?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"
        android:baselineAligned="false">

        <!-- Left panel browse list for Groups or All tabs -->
        <FrameLayout
            android:id="@+id/browse_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            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>

        <!-- Right panel detail view for All tab -->
        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/contact_details_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/background_primary"
            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_marginLeft="16dip"
                android:layout_marginTop="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"/>
        </view>

        <!-- Right panel detail view for Groups tab -->
        <view
            class="com.android.contacts.widget.TransitionAnimationView"
            android:id="@+id/group_details_view"
            android:layout_width="0dip"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/background_primary"
            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>

        <!-- Two-panel view under the Favorites tab -->
        <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="10"
                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="16dip"
                    android:layout_marginLeft="16dip"/>

            </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="8"
                android:layout_marginTop="16dip"
                android:layout_marginRight="16dip"/>

        </LinearLayout>

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