Allapp界面,顶部的谷歌搜索框,在显示大小设置为最大的情况下,搜索框宽度太短问题修改,如下图
在目录 android14\vendor\partner_gms\apps\SearchLauncher\res\values-sw600dp\dimens.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="all_apps_header_top_margin">53dp</dimen>
+ <dimen name="searchbar_width">200dp</dimen>
</resources>
设置布局dp大小
然后在代码内引用
android14\vendor\partner_gms\apps\SearchLauncher\quickstep\src\com\android\searchlauncher\HotseatQsbWidget.java
package com.android.searchlauncher;
public class HotseatQsbWidget extends QsbContainerView implements Insettable, SearchUiManager,
SearchCallback<AdapterItem>, AllAppsStore.OnUpdateListener {
private final ActivityContext mActivity;
// This value was used to position the QSB. We store it here for translationY animations.
private final int mFixedTranslationY;
private final int mMarginTopAdjusting;
+private final int mSearchBarWidth;
private final AllAppsSearchBarController mSearchBarController;
private final SpannableStringBuilder mSearchQueryBuilder;
private ActivityAllAppsContainerView<?> mAppsView;
private ExtendedEditText mFallbackSearchView;
public HotseatQsbWidget(Context context) {
this(context, null);<