Fixed keyboard disappear on empty search

- Closes : #4095
This commit is contained in:
MrSluffy
2024-06-22 15:12:51 +08:00
parent f131f287ee
commit 43a5cc7011

View File

@@ -544,17 +544,12 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
// Will be called at the end of the animation.
return;
}
if (currentActivePage != SEARCH) {
mActivityContext.hideKeyboard();
}
if (mAH.get(currentActivePage).mRecyclerView != null) {
mAH.get(currentActivePage).mRecyclerView.bindFastScrollbar(mFastScroller);
}
// Header keeps track of active recycler view to properly render header
// protection.
mHeader.setActiveRV(currentActivePage);
reset(true /* animate */, !isSearching() /* exitSearch */);
mWorkManager.onActivePageChanged(currentActivePage);
}
@@ -846,7 +841,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
*/
public int getFloatingSearchBarRestingMarginStart() {
DeviceProfile dp = mActivityContext.getDeviceProfile();
return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mContext);
return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mActivityContext);
}
/**
@@ -862,7 +857,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
*/
public int getFloatingSearchBarRestingMarginEnd() {
DeviceProfile dp = mActivityContext.getDeviceProfile();
return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mContext);
return dp.allAppsLeftRightMargin + dp.getAllAppsIconStartMargin(mActivityContext);
}
private void layoutBelowSearchContainer(View v, boolean includeTabsMargin) {