Merge "Change style of search bar text to allow OEM costomization."

This commit is contained in:
TreeHugger Robot
2017-12-01 00:36:42 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 5 deletions

View File

@@ -17,7 +17,8 @@
*/ */
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -43,9 +44,14 @@
android:contentInsetStartWithNavigation="64dp" android:contentInsetStartWithNavigation="64dp"
android:navigationIcon="@drawable/ic_search_24dp" android:navigationIcon="@drawable/ic_search_24dp"
android:navigationContentDescription="@string/search_menu" android:navigationContentDescription="@string/search_menu"
android:title="@string/search_menu" android:theme="?android:attr/actionBarTheme">
android:titleTextAppearance="@style/TextAppearance.SearchBar" <TextView
android:theme="?android:attr/actionBarTheme"/> android:id="@+id/search_action_bar_title"
style="@style/TextAppearance.SearchBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_menu" />
</Toolbar>
</android.support.v7.widget.CardView> </android.support.v7.widget.CardView>
</FrameLayout> </FrameLayout>
<FrameLayout <FrameLayout

View File

@@ -340,6 +340,7 @@ public class SettingsActivity extends SettingsDrawerActivity
if (actionBar != null) { if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(mDisplayHomeAsUpEnabled); actionBar.setDisplayHomeAsUpEnabled(mDisplayHomeAsUpEnabled);
actionBar.setHomeButtonEnabled(mDisplayHomeAsUpEnabled); actionBar.setHomeButtonEnabled(mDisplayHomeAsUpEnabled);
actionBar.setDisplayShowTitleEnabled(!mIsShowingDashboard);
} }
mSwitchBar = findViewById(R.id.switch_bar); mSwitchBar = findViewById(R.id.switch_bar);
if (mSwitchBar != null) { if (mSwitchBar != null) {