Skip to content

Commit 2e307a6

Browse files
Amith YamasaniAndroid (Google) Code Review
authored andcommitted
Merge "No breadcrumbs for single-pane preferences" into jb-mr1-dev
2 parents 0fd713c + 3ec7bac commit 2e307a6

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

core/java/android/preference/PreferenceActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,12 @@ public void showBreadCrumbs(CharSequence title, CharSequence shortTitle) {
10831083
}
10841084
return;
10851085
}
1086+
if (mSinglePane) {
1087+
mFragmentBreadCrumbs.setVisibility(View.GONE);
1088+
// Hide the breadcrumb section completely for single-pane
1089+
View bcSection = findViewById(com.android.internal.R.id.breadcrumb_section);
1090+
if (bcSection != null) bcSection.setVisibility(View.GONE);
1091+
}
10861092
mFragmentBreadCrumbs.setMaxVisible(2);
10871093
mFragmentBreadCrumbs.setActivity(this);
10881094
}

core/res/res/layout-xlarge/breadcrumbs_in_fragment.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
-->
1616

1717
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18+
android:id="@+android:id/breadcrumb_section"
1819
android:orientation="vertical"
1920
android:layout_height="wrap_content"
2021
android:layout_width="match_parent"

core/res/res/values/symbols.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
<java-symbol type="id" name="sms_short_code_detail_message" />
218218
<java-symbol type="id" name="sms_short_code_remember_choice_checkbox" />
219219
<java-symbol type="id" name="sms_short_code_remember_undo_instruction" />
220+
<java-symbol type="id" name="breadcrumb_section" />
220221

221222
<java-symbol type="attr" name="actionModeShareDrawable" />
222223
<java-symbol type="attr" name="alertDialogCenterButtons" />

0 commit comments

Comments
 (0)