private boolean shouldShowSearchBox = false;
private boolean hasSubmittedQuery = false;
private boolean hasHardwareKeyboard = false;
- private boolean applySoftKeyboardFix = false;
private int layoutId = R.layout.start_menu_left;
super.onCreate();
hasHardwareKeyboard = getResources().getConfiguration().keyboard != Configuration.KEYBOARD_NOKEYS;
- applySoftKeyboardFix = hasHardwareKeyboard /* && U.isChromeOs(this) */ ;
SharedPreferences pref = U.getSharedPreferences(this);
if(pref.getBoolean("taskbar_active", false) || LauncherHelper.getInstance().isOnHomeScreen()) {
layout.setOnClickListener(ocl);
layout.setVisibility(View.VISIBLE);
- if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1 && !applySoftKeyboardFix)
+ if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1 && !hasHardwareKeyboard)
layout.setAlpha(1);
MenuHelper.getInstance().setStartMenuOpen(true);
EditText editText = searchView.findViewById(R.id.search_src_text);
if(searchView.getVisibility() == View.VISIBLE) {
- if(applySoftKeyboardFix) {
+ if(hasHardwareKeyboard) {
searchView.setIconifiedByDefault(true);
if(editText != null)
refreshApps(false);
new Handler().postDelayed(() -> {
- if(Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1 || applySoftKeyboardFix)
+ if(Build.VERSION.SDK_INT > Build.VERSION_CODES.N_MR1 || hasHardwareKeyboard)
layout.setAlpha(1);
- if(applySoftKeyboardFix) {
+ if(hasHardwareKeyboard) {
searchView.setIconifiedByDefault(false);
if(editText != null)
editText.setShowSoftInputOnFocus(true);
layout.postDelayed(() -> {
layout.setVisibility(View.GONE);
- if(!applySoftKeyboardFix)
+ if(!hasHardwareKeyboard)
searchView.setQuery(null, false);
searchView.setIconified(true);