Change style of search bar text to allow OEM costomization.

Change-Id: I78dbe6780e3a4adefe82a36400d9fff8c1de92e3
Fixes: 68814716
Test: visual
This commit is contained in:
Fan Zhang
2017-11-30 14:41:04 -08:00
parent 681a4cdd47
commit e096ae7acb
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"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -43,9 +44,14 @@
android:contentInsetStartWithNavigation="64dp"
android:navigationIcon="@drawable/ic_search_24dp"
android:navigationContentDescription="@string/search_menu"
android:title="@string/search_menu"
android:titleTextAppearance="@style/TextAppearance.SearchBar"
android:theme="?android:attr/actionBarTheme"/>
android:theme="?android:attr/actionBarTheme">
<TextView
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>
</FrameLayout>
<FrameLayout

View File

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