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

Commit 8922d774 authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Fix preferences padding for single-pane screens."

parents f60ac630 96313a9e
Loading
Loading
Loading
Loading
+0 −123
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/assets/res/layout/list_content.xml
**
** Copyright 2006, 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.
*/
-->

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_height="match_parent"
    android:layout_width="match_parent">

    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="0px"
        android:layout_marginTop="@dimen/preference_screen_top_margin"
        android:layout_marginBottom="@dimen/preference_screen_bottom_margin"
        android:layout_weight="1">

        <LinearLayout
            android:id="@+id/headers"
            android:orientation="vertical"
            android:layout_width="0px"
            android:layout_height="match_parent"
            android:layout_marginRight="@dimen/preference_screen_side_margin_negative"
            android:layout_marginLeft="@dimen/preference_screen_side_margin"
            android:layout_weight="@integer/preferences_left_pane_weight">

            <ListView android:id="@android:id/list"
                android:layout_width="match_parent"
                android:layout_height="0px"
                android:layout_weight="1"
                android:paddingLeft="@dimen/preference_screen_header_padding_side"
                android:paddingRight="@dimen/preference_screen_header_padding_side"
                android:paddingTop="@dimen/preference_screen_header_vertical_padding"
                android:paddingBottom="@dimen/preference_screen_header_vertical_padding"
                android:scrollbarStyle="@integer/preference_screen_header_scrollbarStyle"
                android:drawSelectorOnTop="false"
                android:cacheColorHint="@android:color/transparent"
                android:listPreferredItemHeight="48dp"
                android:scrollbarAlwaysDrawVerticalTrack="true" />

            <FrameLayout android:id="@+id/list_footer"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="0" />

        </LinearLayout>

        <LinearLayout
                android:id="@+id/prefs_frame"
                android:layout_width="0px"
                android:layout_height="match_parent"
                android:layout_weight="@integer/preferences_right_pane_weight"
                android:layout_marginLeft="@dimen/preference_screen_side_margin"
                android:layout_marginRight="@dimen/preference_screen_side_margin"
                android:background="?attr/detailsElementBackground"
                android:orientation="vertical"
                android:visibility="gone" >

            <!-- Breadcrumb inserted here, in certain screen sizes. In others, it will be an
                empty layout or just padding, and PreferenceActivity will put the breadcrumbs in
                the action bar. -->
            <include layout="@layout/breadcrumbs_in_fragment" />

            <android.preference.PreferenceFrameLayout android:id="@+id/prefs"
                    android:layout_width="match_parent"
                    android:layout_height="0dip"
                    android:layout_weight="1"
                />
        </LinearLayout>
    </LinearLayout>

    <RelativeLayout android:id="@+id/button_bar"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_weight="0"
        android:visibility="gone">

        <Button android:id="@+id/back_button"
            android:layout_width="150dip"
            android:layout_height="wrap_content"
            android:layout_margin="5dip"
            android:layout_alignParentLeft="true"
            android:text="@string/back_button_label"
        />
        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true">

            <Button android:id="@+id/skip_button"
                android:layout_width="150dip"
                android:layout_height="wrap_content"
                android:layout_margin="5dip"
                android:text="@string/skip_button_label"
                android:visibility="gone"
            />

            <Button android:id="@+id/next_button"
                android:layout_width="150dip"
                android:layout_height="wrap_content"
                android:layout_margin="5dip"
                android:text="@string/next_button_label"
            />
        </LinearLayout>
    </RelativeLayout>
</LinearLayout>
+2 −4
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@
        android:orientation="horizontal"
        android:layout_width="match_parent"
        android:layout_height="0px"
        android:layout_marginTop="@dimen/preference_screen_top_margin"
        android:layout_marginBottom="@dimen/preference_screen_bottom_margin"
        android:layout_weight="1">

        <LinearLayout
@@ -48,6 +46,7 @@
                android:paddingRight="@dimen/preference_screen_header_padding_side"
                android:paddingTop="@dimen/preference_screen_header_vertical_padding"
                android:paddingBottom="@dimen/preference_screen_header_vertical_padding"
                android:clipToPadding="false"
                android:scrollbarStyle="@integer/preference_screen_header_scrollbarStyle"
                android:drawSelectorOnTop="false"
                android:cacheColorHint="@android:color/transparent"
@@ -63,11 +62,10 @@

        <LinearLayout
                android:id="@+id/prefs_frame"
                style="?attr/preferencePanelStyle"
                android:layout_width="0px"
                android:layout_height="match_parent"
                android:layout_weight="@integer/preferences_right_pane_weight"
                android:layout_marginLeft="@dimen/preference_screen_side_margin"
                android:layout_marginRight="@dimen/preference_screen_side_margin"
                android:orientation="vertical"
                android:visibility="gone" >

+3 −0
Original line number Diff line number Diff line
@@ -39,6 +39,9 @@
                android:layout_height="0px"
                android:layout_weight="1"
                android:drawSelectorOnTop="false"
                android:paddingLeft="@dimen/preference_fragment_padding_side"
                android:paddingRight="@dimen/preference_fragment_padding_side"
                android:scrollbarStyle="@integer/preference_fragment_scrollbarStyle"
                android:cacheColorHint="@android:color/transparent"
                android:listPreferredItemHeight="48dp"
                android:scrollbarAlwaysDrawVerticalTrack="true" />
+0 −4
Original line number Diff line number Diff line
@@ -21,10 +21,6 @@
    <dimen name="alert_dialog_button_bar_height">54dip</dimen>
    <!-- Preference fragment padding, bottom -->
    <dimen name="preference_fragment_padding_bottom">16dp</dimen>
    <!-- Preference activity top margin -->
    <dimen name="preference_screen_top_margin">16dp</dimen>
    <!-- Preference activity bottom margin -->
    <dimen name="preference_screen_bottom_margin">16dp</dimen>

    <dimen name="preference_screen_header_padding_side">0dip</dimen>

+0 −25
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.
-->

<resources>
    <style name="PreferencePanel">
        <item name="android:layout_marginLeft">@dimen/preference_screen_side_margin</item>
        <item name="android:layout_marginRight">@dimen/preference_screen_side_margin</item>
        <item name="android:layout_marginTop">48dip</item>
        <item name="android:layout_marginBottom">48dip</item>
        <item name="android:background">?attr/detailsElementBackground</item>
    </style>
</resources>
Loading