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" 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,13 +44,18 @@
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
android:id="@+id/main_content" android:id="@+id/main_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_width="match_parent"/> android:layout_width="match_parent" />
</LinearLayout> </LinearLayout>

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) {