本文主要是介绍[QCM6125][Android10] 系统设置隐藏搜索栏以及右上角的搜索按钮,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
文章目录
- 开发平台基本信息
- 解决方法
开发平台基本信息
芯片: QCM6125
版本: Android 10
kernel: msm-4.14
解决方法
--- a/packages/apps/Settings/res/layout/settings_homepage_container.xml
+++ b/packages/apps/Settings/res/layout/settings_homepage_container.xml
@@ -53,9 +53,9 @@</LinearLayout></androidx.core.widget.NestedScrollView>- <com.google.android.material.appbar.AppBarLayout
+ <!-- <com.google.android.material.appbar.AppBarLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"><include layout="@layout/search_bar"/>
- </com.google.android.material.appbar.AppBarLayout>
+ </com.google.android.material.appbar.AppBarLayout> --></androidx.coordinatorlayout.widget.CoordinatorLayout>
--- a/packages/apps/Settings/src/com/android/settings/homepage/SettingsHomepageActivity.java
+++ b/packages/apps/Settings/src/com/android/settings/homepage/SettingsHomepageActivity.java
@@ -48,14 +48,14 @@ public class SettingsHomepageActivity extends FragmentActivity {root.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);- setHomepageContainerPaddingTop();
+ // setHomepageContainerPaddingTop();- final Toolbar toolbar = findViewById(R.id.search_action_bar);
- FeatureFactory.getFactory(this).getSearchFeatureProvider()
- .initSearchToolbar(this /* activity */, toolbar, SettingsEnums.SETTINGS_HOMEPAGE);
+ // final Toolbar toolbar = findViewById(R.id.search_action_bar);
+ // FeatureFactory.getFactory(this).getSearchFeatureProvider()
+ // .initSearchToolbar(this /* activity */, toolbar, SettingsEnums.SETTINGS_HOMEPAGE);- final ImageView avatarView = findViewById(R.id.account_avatar);
- getLifecycle().addObserver(new AvatarViewMixin(this, avatarView));
+ // final ImageView avatarView = findViewById(R.id.account_avatar);
+ // getLifecycle().addObserver(new AvatarViewMixin(this, avatarView));getLifecycle().addObserver(new HideNonSystemOverlayMixin(this));if (!getSystemService(ActivityManager.class).isLowRamDevice()) {
--- a/packages/apps/Settings/src/com/android/settings/search/actionbar/SearchMenuController.java
+++ b/packages/apps/Settings/src/com/android/settings/search/actionbar/SearchMenuController.java
@@ -61,6 +61,9 @@ public class SearchMenuController implements LifecycleObserver, OnCreateOptionsM@Overridepublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ if(true){
+ return;
+ }final Context context = mHost.getContext();final String SettingsIntelligencePkgName = context.getString(
这篇关于[QCM6125][Android10] 系统设置隐藏搜索栏以及右上角的搜索按钮的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!