Loading core/java/android/preference/Preference.java +2 −0 Original line number Diff line number Diff line Loading @@ -519,6 +519,7 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis if (mIcon != null) { imageView.setImageDrawable(mIcon); } imageView.setVisibility(mIcon != null ? View.VISIBLE : View.GONE); } if (mShouldDisableView) { setEnabledStateOnViews(view, isEnabled()); Loading Loading @@ -618,6 +619,7 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis public void setIcon(Drawable icon) { if ((icon == null && mIcon != null) || (icon != null && mIcon != icon)) { mIcon = icon; notifyChanged(); } } Loading core/java/android/preference/PreferenceActivity.java +8 −16 Original line number Diff line number Diff line Loading @@ -18,9 +18,6 @@ package android.preference; import com.android.internal.util.XmlUtils; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import android.app.ActionBar; import android.app.Fragment; import android.app.FragmentBreadCrumbs; Loading @@ -44,8 +41,8 @@ import android.util.TypedValue; import android.util.Xml; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.AbsListView; import android.widget.ArrayAdapter; import android.widget.Button; Loading @@ -58,6 +55,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; /** * This is the base class for an activity to show a hierarchy of preferences * to the user. Prior to {@link android.os.Build.VERSION_CODES#HONEYCOMB} Loading Loading @@ -641,17 +641,9 @@ public abstract class PreferenceActivity extends ListActivity implements * enough. */ public boolean onIsMultiPane() { Configuration config = getResources().getConfiguration(); if ((config.screenLayout&Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE) { return true; } if ((config.screenLayout&Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE && config.orientation == Configuration.ORIENTATION_LANDSCAPE) { return true; } return false; boolean preferMultiPane = getResources().getBoolean( com.android.internal.R.bool.preferences_prefer_dual_pane); return preferMultiPane; } /** Loading Loading @@ -992,7 +984,7 @@ public abstract class PreferenceActivity extends ListActivity implements if (mFragmentBreadCrumbs == null) { View crumbs = findViewById(android.R.id.title); // For screens with a different kind of title, don't create breadcrumbs. if (!(crumbs instanceof FragmentBreadCrumbs)) return; if (crumbs != null && !(crumbs instanceof FragmentBreadCrumbs)) return; mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(android.R.id.title); if (mFragmentBreadCrumbs == null) { mFragmentBreadCrumbs = new FragmentBreadCrumbs(this); Loading core/res/res/layout-xlarge/preference_list_content_single.xml→core/res/res/layout-w600dp/preference_list_content_single.xml +0 −0 File moved. View file core/res/res/layout-xlarge/breadcrumbs_in_fragment.xml 0 → 100644 +39 −0 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. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="match_parent"> <android.app.FragmentBreadCrumbs android:id="@android:id/title" android:layout_height="72dip" android:layout_width="match_parent" android:paddingTop="16dip" android:paddingBottom="8dip" android:gravity="center_vertical|left" android:layout_marginLeft="@dimen/preference_breadcrumb_paddingLeft" android:layout_marginRight="@dimen/preference_breadcrumb_paddingRight" /> <ImageView android:layout_width="match_parent" android:layout_height="1dip" android:paddingLeft="@dimen/preference_breadcrumb_paddingLeft" android:paddingRight="@dimen/preference_breadcrumb_paddingRight" android:src="#404040" /> </LinearLayout> No newline at end of file core/res/res/layout/breadcrumbs_in_fragment.xml 0 → 100644 +22 −0 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. --> <!-- This layout disables breadcrumbs in the fragment area and causes PreferenceActivity to put the breadcrumbs in the action bar. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="@dimen/preference_fragment_padding_side" android:layout_width="match_parent"> </LinearLayout> No newline at end of file Loading
core/java/android/preference/Preference.java +2 −0 Original line number Diff line number Diff line Loading @@ -519,6 +519,7 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis if (mIcon != null) { imageView.setImageDrawable(mIcon); } imageView.setVisibility(mIcon != null ? View.VISIBLE : View.GONE); } if (mShouldDisableView) { setEnabledStateOnViews(view, isEnabled()); Loading Loading @@ -618,6 +619,7 @@ public class Preference implements Comparable<Preference>, OnDependencyChangeLis public void setIcon(Drawable icon) { if ((icon == null && mIcon != null) || (icon != null && mIcon != icon)) { mIcon = icon; notifyChanged(); } } Loading
core/java/android/preference/PreferenceActivity.java +8 −16 Original line number Diff line number Diff line Loading @@ -18,9 +18,6 @@ package android.preference; import com.android.internal.util.XmlUtils; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import android.app.ActionBar; import android.app.Fragment; import android.app.FragmentBreadCrumbs; Loading @@ -44,8 +41,8 @@ import android.util.TypedValue; import android.util.Xml; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.AbsListView; import android.widget.ArrayAdapter; import android.widget.Button; Loading @@ -58,6 +55,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; /** * This is the base class for an activity to show a hierarchy of preferences * to the user. Prior to {@link android.os.Build.VERSION_CODES#HONEYCOMB} Loading Loading @@ -641,17 +641,9 @@ public abstract class PreferenceActivity extends ListActivity implements * enough. */ public boolean onIsMultiPane() { Configuration config = getResources().getConfiguration(); if ((config.screenLayout&Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE) { return true; } if ((config.screenLayout&Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_LARGE && config.orientation == Configuration.ORIENTATION_LANDSCAPE) { return true; } return false; boolean preferMultiPane = getResources().getBoolean( com.android.internal.R.bool.preferences_prefer_dual_pane); return preferMultiPane; } /** Loading Loading @@ -992,7 +984,7 @@ public abstract class PreferenceActivity extends ListActivity implements if (mFragmentBreadCrumbs == null) { View crumbs = findViewById(android.R.id.title); // For screens with a different kind of title, don't create breadcrumbs. if (!(crumbs instanceof FragmentBreadCrumbs)) return; if (crumbs != null && !(crumbs instanceof FragmentBreadCrumbs)) return; mFragmentBreadCrumbs = (FragmentBreadCrumbs) findViewById(android.R.id.title); if (mFragmentBreadCrumbs == null) { mFragmentBreadCrumbs = new FragmentBreadCrumbs(this); Loading
core/res/res/layout-xlarge/preference_list_content_single.xml→core/res/res/layout-w600dp/preference_list_content_single.xml +0 −0 File moved. View file
core/res/res/layout-xlarge/breadcrumbs_in_fragment.xml 0 → 100644 +39 −0 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. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="match_parent"> <android.app.FragmentBreadCrumbs android:id="@android:id/title" android:layout_height="72dip" android:layout_width="match_parent" android:paddingTop="16dip" android:paddingBottom="8dip" android:gravity="center_vertical|left" android:layout_marginLeft="@dimen/preference_breadcrumb_paddingLeft" android:layout_marginRight="@dimen/preference_breadcrumb_paddingRight" /> <ImageView android:layout_width="match_parent" android:layout_height="1dip" android:paddingLeft="@dimen/preference_breadcrumb_paddingLeft" android:paddingRight="@dimen/preference_breadcrumb_paddingRight" android:src="#404040" /> </LinearLayout> No newline at end of file
core/res/res/layout/breadcrumbs_in_fragment.xml 0 → 100644 +22 −0 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. --> <!-- This layout disables breadcrumbs in the fragment area and causes PreferenceActivity to put the breadcrumbs in the action bar. --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_height="@dimen/preference_fragment_padding_side" android:layout_width="match_parent"> </LinearLayout> No newline at end of file