diff options
-rw-r--r-- | res/layout/preference_profiles.xml | 62 | ||||
-rw-r--r-- | src/com/android/settings/profiles/ProfilesList.java | 5 | ||||
-rw-r--r-- | src/com/android/settings/profiles/ProfilesSettings.java | 8 |
3 files changed, 29 insertions, 46 deletions
diff --git a/res/layout/preference_profiles.xml b/res/layout/preference_profiles.xml index 05c7f9e..9a990d4 100644 --- a/res/layout/preference_profiles.xml +++ b/res/layout/preference_profiles.xml @@ -1,4 +1,5 @@ <?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> diff --git a/src/com/android/settings/profiles/ProfilesList.java b/src/com/android/settings/profiles/ProfilesList.java index 7cc2048..250051a 100644 --- a/src/com/android/settings/profiles/ProfilesList.java +++ b/src/com/android/settings/profiles/ProfilesList.java @@ -57,11 +57,6 @@ public class ProfilesList extends SettingsPreferenceFragment implements public void onResume() { super.onResume(); refreshList(); - - // On tablet devices remove the padding - if (Utils.isTablet(getActivity())) { - getListView().setPadding(0, 0, 0, 0); - } } public void refreshList() { diff --git a/src/com/android/settings/profiles/ProfilesSettings.java b/src/com/android/settings/profiles/ProfilesSettings.java index 1f14113..0c3bcd9 100644 --- a/src/com/android/settings/profiles/ProfilesSettings.java +++ b/src/com/android/settings/profiles/ProfilesSettings.java @@ -30,9 +30,6 @@ import android.os.Bundle; import android.provider.Settings; import android.support.v4.view.ViewPager; import android.support.v13.app.FragmentStatePagerAdapter; -import android.util.Log; -import android.view.Gravity; -import android.text.TextUtils; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -143,11 +140,6 @@ public class ProfilesSettings extends SettingsPreferenceFragment { // check if we are enabled updateProfilesEnabledState(); - - // If running on a phone, remove padding around tabs - if (!Utils.isTablet(getActivity())) { - mContainer.setPadding(0, 0, 0, 0); - } } @Override |