Fix work tab is gone when leaving search mode

1. onSearchResultsChanged is not called if the query is empty.
   Introduce onClearSearchResult and restore the tab there
2. rebindAdapters should only perform the actual logic
   if showTabs != mShowTabs, except the first time when we init the
   layout in onFinishInflate.

Fix: 71737947
Change-Id: I5485d6be0fc33b73aa6e0709be66cef8d43b4dbd
This commit is contained in:
Tony Mak
2018-01-11 15:29:50 +00:00
parent b5d047ca14
commit 7ccbefcc56
2 changed files with 17 additions and 11 deletions

View File

@@ -184,6 +184,7 @@ public class AppsSearchContainerLayout extends FrameLayout
mSearchQueryBuilder.clear();
mSearchQueryBuilder.clearSpans();
Selection.setSelection(mSearchQueryBuilder, 0);
mAppsView.onClearSearchResult();
}
@Override