try {
mFragmentBreadCrumbs = (FragmentBreadCrumbs)crumbs;
} catch (ClassCastException e) {
+ setTitle(title);
return;
}
if (mFragmentBreadCrumbs == null) {
// Hide the breadcrumb section completely for single-pane
View bcSection = findViewById(com.android.internal.R.id.breadcrumb_section);
if (bcSection != null) bcSection.setVisibility(View.GONE);
+ setTitle(title);
}
mFragmentBreadCrumbs.setMaxVisible(2);
mFragmentBreadCrumbs.setActivity(this);
}
- mFragmentBreadCrumbs.setTitle(title, shortTitle);
- mFragmentBreadCrumbs.setParentTitle(null, null, null);
+ if (mFragmentBreadCrumbs.getVisibility() != View.VISIBLE) {
+ setTitle(title);
+ } else {
+ mFragmentBreadCrumbs.setTitle(title, shortTitle);
+ mFragmentBreadCrumbs.setParentTitle(null, null, null);
+ }
}
/**
android:layout_weight="1">
<LinearLayout
+ style="?attr/preferenceHeaderPanelStyle"
android:id="@+id/headers"
android:orientation="vertical"
android:layout_width="0px"
android:layout_height="match_parent"
- android:layout_marginEnd="@dimen/preference_screen_side_margin_negative"
- android:layout_marginStart="@dimen/preference_screen_side_margin"
android:layout_weight="@integer/preferences_left_pane_weight">
<ListView android:id="@android:id/list"
+ style="?attr/preferenceListStyle"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
- android:paddingStart="@dimen/preference_screen_header_padding_side"
- android:paddingEnd="@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"
android:listPreferredItemHeight="48dp"
android:layout_removeBorders="true">
<ListView android:id="@android:id/list"
+ style="?attr/preferenceFragmentListStyle"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="1"
android:paddingTop="0dip"
android:paddingBottom="@dimen/preference_fragment_padding_bottom"
- android:paddingStart="@dimen/preference_fragment_padding_side"
- android:paddingEnd="@dimen/preference_fragment_padding_side"
android:scrollbarStyle="@integer/preference_fragment_scrollbarStyle"
android:clipToPadding="false"
android:drawSelectorOnTop="false"
<attr name="preferenceLayoutChild" format="reference" />
<!-- Preference panel style -->
<attr name="preferencePanelStyle" format="reference" />
+ <!-- Preference headers panel style -->
+ <attr name="preferenceHeaderPanelStyle" format="reference" />
+ <!-- Preference list style -->
+ <attr name="preferenceListStyle" format="reference" />
+ <!-- Preference fragment list style -->
+ <attr name="preferenceFragmentListStyle" format="reference" />
+ <!-- Preference fragment padding side -->
+ <attr name="preferenceFragmentPaddingSide" format="dimension" />
<!-- Default style for switch preferences. -->
<attr name="switchPreferenceStyle" format="reference" />
<item name="android:background">@null</item>
</style>
+ <style name="PreferenceHeaderPanel">
+ <item name="android:layout_marginStart">@dimen/preference_screen_side_margin</item>
+ <item name="android:layout_marginEnd">@dimen/preference_screen_side_margin_negative</item>
+ <item name="android:paddingTop">@dimen/preference_screen_header_vertical_padding</item>
+ <item name="android:paddingBottom">@dimen/preference_screen_header_vertical_padding</item>
+ </style>
+
+ <style name="PreferenceHeaderList">
+ <item name="android:paddingStart">@dimen/preference_screen_header_padding_side</item>
+ <item name="android:paddingEnd">@dimen/preference_screen_header_padding_side</item>
+ <item name="android:scrollbarStyle">@integer/preference_screen_header_scrollbarStyle</item>
+ </style>
+
+ <style name="PreferenceFragmentList">
+ <item name="android:paddingStart">@dimen/preference_fragment_padding_side</item>
+ <item name="android:paddingEnd">@dimen/preference_fragment_padding_side</item>
+ </style>
+
<!-- Other Misc Styles -->
<eat-comment />
<style name="Widget.Holo.PreferenceFrameLayout">
<item name="android:borderTop">0dip</item>
<item name="android:borderBottom">@dimen/preference_fragment_padding_bottom</item>
- <item name="android:borderLeft">@dimen/preference_fragment_padding_side</item>
- <item name="android:borderRight">@dimen/preference_fragment_padding_side</item>
+ <item name="android:borderLeft">?attr/preferenceFragmentPaddingSide</item>
+ <item name="android:borderRight">?attr/preferenceFragmentPaddingSide</item>
</style>
<!-- Pointer styles -->
<item name="ringtonePreferenceStyle">@android:style/Preference.RingtonePreference</item>
<item name="preferenceLayoutChild">@android:layout/preference_child</item>
<item name="preferencePanelStyle">@style/PreferencePanel</item>
+ <item name="preferenceHeaderPanelStyle">@style/PreferenceHeaderPanel</item>
+ <item name="preferenceListStyle">@style/PreferenceHeaderList</item>
+ <item name="preferenceFragmentListStyle">@style/PreferenceFragmentList</item>
+ <item name="preferenceFragmentPaddingSide">@dimen/preference_fragment_padding_side</item>
<item name="detailsElementBackground">@android:drawable/panel_bg_holo_dark</item>
<!-- Search widget styles -->