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

Commit 45826d5a authored by DvTonder's avatar DvTonder Committed by Gerrit Code Review
Browse files

Fix Profiles settings screen padding

Change-Id: Iff56f777141cc1e56492da7a2b20e2af02a7db8f
parent b5e47968
Loading
Loading
Loading
Loading
+29 −33
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");
@@ -14,82 +15,77 @@
     limitations under the License.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:gravity="center_vertical">
    android:gravity="center_vertical"
    android:minHeight="?android:attr/listPreferredItemHeight">

    <LinearLayout
        android:id="@+id/profiles_pref"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center_vertical"
        android:background="?android:attr/selectableItemBackground"
        android:clickable="true"
        android:focusable="true"
        android:background="?android:attr/selectableItemBackground">
        android:gravity="center_vertical"
        android:paddingStart="@*android:dimen/preference_item_padding_side">

        <LinearLayout
            android:id="@android:id/widget_frame"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center_vertical|end"
            android:layout_marginEnd="4dip"
            android:layout_marginStart="10dip"
            android:gravity="center_vertical"
            android:orientation="vertical" />

        <RelativeLayout
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="6dip"
            android:layout_marginTop="6dip"
            android:layout_marginBottom="6dip"
            android:layout_weight="1">
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:clickable="true"
            android:focusable="true"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <TextView
                android:id="@+android:id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:singleLine="true"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:ellipsize="marquee"
                android:fadingEdge="horizontal"/>
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <TextView
                android:id="@android:id/summary"
                android:id="@+android:id/summary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@android:id/title"
                android:layout_alignStart="@android:id/title"
                android:paddingBottom="3dip"
                android:visibility="gone"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textSize="13sp"
                android:focusable="false"
                android:maxLines="4" />
                android:textAppearance="?android:attr/textAppearanceSmall" />

        </RelativeLayout>
        </LinearLayout>

    </LinearLayout>

    <View
        android:layout_width="2dip"
        android:layout_height="match_parent"
        android:layout_marginTop="5dip"
        android:layout_marginBottom="5dip"
        android:layout_marginTop="5dip"
        android:background="@android:drawable/divider_horizontal_dark" />

    <ImageView
        android:id="@+id/profiles_settings"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:paddingStart="15dip"
        android:paddingEnd="?android:attr/scrollbarSize"
        android:src="@drawable/ic_sysbar_quicksettings"
        android:contentDescription="@string/input_method_settings_button"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:background="?android:attr/selectableItemBackground"
        android:clickable="true"
        android:contentDescription="@string/input_method_settings_button"
        android:focusable="true"
        android:background="?android:attr/selectableItemBackground" />
        android:paddingEnd="12dp"
        android:paddingStart="12dip"
        android:src="@drawable/ic_sysbar_quicksettings" />

</LinearLayout>
+0 −5
Original line number Diff line number Diff line
@@ -52,11 +52,6 @@ public class ProfilesList extends SettingsPreferenceFragment implements
    public void onResume() {
        super.onResume();
        refreshList();

        // On tablet devices remove the padding
        if (ScreenType.isTablet(getActivity())) {
            getListView().setPadding(0, 0, 0, 0);
        }
    }

    @Override
+0 −5
Original line number Diff line number Diff line
@@ -135,11 +135,6 @@ public class ProfilesSettings extends SettingsPreferenceFragment

        // check if we are enabled
        updateProfilesEnabledState();

        // If running on a phone, remove padding around tabs
        if (!ScreenType.isTablet(getActivity())) {
            mContainer.setPadding(0, 0, 0, 0);
        }
    }

    @Override