Change style of search bar text to allow OEM costomization.
Change-Id: I78dbe6780e3a4adefe82a36400d9fff8c1de92e3
Fixes: 68814716
Test: visual
diff --git a/res/layout/settings_main_dashboard.xml b/res/layout/settings_main_dashboard.xml
index 269bc3c..4f8c308 100644
--- a/res/layout/settings_main_dashboard.xml
+++ b/res/layout/settings_main_dashboard.xml
@@ -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,13 +44,18 @@
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
android:id="@+id/main_content"
android:layout_height="match_parent"
- android:layout_width="match_parent"/>
+ android:layout_width="match_parent" />
</LinearLayout>
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 193c2b3..dc961be 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -340,6 +340,7 @@
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(mDisplayHomeAsUpEnabled);
actionBar.setHomeButtonEnabled(mDisplayHomeAsUpEnabled);
+ actionBar.setDisplayShowTitleEnabled(!mIsShowingDashboard);
}
mSwitchBar = findViewById(R.id.switch_bar);
if (mSwitchBar != null) {