Launch first search item on enter
This commit is contained in:
1 parent
857c89b050
commit
4cea9e5768
14 files changed
+194
-7
No files matched your search
@@ -101,6 +101,7 @@ public class ExtendedEditText extends EditText {
|
||||
|
||||
// inherited class can override to change the appearance of the edit text.
|
||||
public void show() {}
|
||||
public void hide() {}
|
||||
|
||||
public void showKeyboard() {
|
||||
mShowImeAfterFirstLayout = !showSoftInput();
|
||||
|
||||
@@ -61,6 +61,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.DragSource;
|
||||
import com.android.launcher3.DropTarget.DragObject;
|
||||
import com.android.launcher3.ExtendedEditText;
|
||||
import com.android.launcher3.Insettable;
|
||||
import com.android.launcher3.InsettableFrameLayout;
|
||||
import com.android.launcher3.R;
|
||||
@@ -806,8 +807,14 @@ public class AllAppsContainerView extends AllAppsStretchLayout implements DragSo
|
||||
getSearchView().setBackgroundColor(viewBG);
|
||||
getFloatingHeaderView().setHeaderColor(viewBG);
|
||||
invalidateHeader();
|
||||
if (mHeaderColor == mScrimColor && mSearchUiManager.getEditText() != null) {
|
||||
mSearchUiManager.getEditText().show();
|
||||
|
||||
ExtendedEditText editText = mSearchUiManager.getEditText();
|
||||
if (editText != null) {
|
||||
if (mHeaderColor == mScrimColor) {
|
||||
editText.show();
|
||||
} else {
|
||||
editText.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,6 @@ public class AllAppsSearchBarController
|
||||
public void reset() {
|
||||
mCallback.clearSearchResult();
|
||||
mInput.reset();
|
||||
mInput.clearFocus();
|
||||
mQuery = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user