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

Commit 03003861 authored by Zheng Fu's avatar Zheng Fu
Browse files

Add padding to join contact list view

Several changes are involved:
1. Add padding to all the contact list views of ContactSelectionActivity so
they can be contained in a centered card in sw600dp-land and sw720dp mode.
2. Make the tab indicator thicker on tablets.
3. Make tab text size, frequently contacted title text size, list item text
size and list item line space bigger on tablet.

Bug:16553819
Bug:17132856
Bug:17157006

Change-Id: I5f5a53e33f8ea090573edb1c7f23ebac7260190d
parent 4fdb6497
Loading
Loading
Loading
Loading
+0 −76
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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"
    android:id="@+id/pinned_header_list_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/people_activity_space_layout_weight"
            android:background="@color/background_primary"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:background="@color/contact_all_list_background_color"
            android:layout_weight="@integer/people_activity_list_view_layout_weight"
            android:elevation="@dimen/people_activity_card_elevation"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/people_activity_space_layout_weight"
            android:background="@color/background_primary"/>
    </LinearLayout>
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <!-- Shown only when an Account filter is set.
             - paddingTop should be here to show "shade" effect correctly. -->
        <include
            android:id="@+id/account_filter_header_container"
            layout="@layout/account_filter_header" />

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="0dip"
            android:layout_weight="1" >
            <view
                class="com.android.contacts.common.list.PinnedHeaderListView"
                android:id="@android:id/list"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginLeft="?attr/contact_browser_list_padding_left"
                android:layout_marginRight="?attr/contact_browser_list_padding_right"
                android:layout_marginStart="?attr/contact_browser_list_padding_left"
                android:layout_marginEnd="?attr/contact_browser_list_padding_right"
                android:fastScrollEnabled="true"
                android:fadingEdge="none" />
            <ProgressBar
                android:id="@+id/search_progress"
                style="?android:attr/progressBarStyleLarge"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:visibility="gone" />
        </FrameLayout>
    </LinearLayout>
</FrameLayout>
+0 −64
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="?attr/favorites_padding_bottom">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/people_activity_space_layout_weight"
            android:background="@color/background_primary"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:background="@color/contact_favorites_list_background_color"
            android:layout_weight="@integer/people_activity_list_view_layout_weight"
            android:elevation="@dimen/people_activity_card_elevation"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/people_activity_space_layout_weight"
            android:background="@color/background_primary"/>
    </LinearLayout>
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <ListView
            android:id="@+id/contact_tile_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingTop="@dimen/contact_tile_list_padding_top"
            android:clipToPadding="false"
            android:fadingEdge="none"
            android:divider="@null"
            android:scrollbarStyle="outsideOverlay"/>
        <TextView
            android:id="@+id/contact_tile_list_empty"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center_horizontal"
            android:layout_marginTop="@dimen/empty_message_top_margin"
            android:textColor="?android:attr/textColorSecondary"
            android:textAppearance="?android:attr/textAppearanceLarge"/>
    </FrameLayout>
</FrameLayout>
+0 −49
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="?attr/favorites_padding_bottom">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/people_activity_space_layout_weight"
            android:background="@color/background_primary"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:background="@color/contact_favorites_list_background_color"
            android:layout_weight="@integer/people_activity_list_view_layout_weight"
            android:elevation="@dimen/people_activity_card_elevation"/>
        <View
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="@integer/people_activity_space_layout_weight"
            android:background="@color/background_primary"/>
    </LinearLayout>
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true">
        <include layout="@layout/contacts_unavailable_fragment_content"/>
    </ScrollView>
</FrameLayout>
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent">

    <include layout="@layout/contact_list_card"/>

    <view
        class="com.android.contacts.common.list.PinnedHeaderListView"
        android:id="@android:id/list"
+4 −1
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@
    android:paddingBottom="?attr/favorites_padding_bottom"
    android:background="@color/background_primary">

    <include layout="@layout/contact_list_card"/>

    <ListView
        android:id="@+id/contact_tile_list"
        android:layout_width="match_parent"
@@ -28,7 +30,8 @@
        android:paddingTop="@dimen/contact_tile_list_padding_top"
        android:clipToPadding="false"
        android:fadingEdge="none"
        android:divider="@null" />
        android:divider="@null"
        android:scrollbarStyle="outsideOverlay"/>

    <TextView
        android:id="@+id/contact_tile_list_empty"
Loading