mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Enable suggestions for Folder names.
We turn on suggestions, turn off auto complete, and disable the default behavior where red lines appear under typos. Bug: 30055146 Change-Id: Ia151b7a4db1dfc6908504e6ea82a1f6989f05ca5
This commit is contained in:
@@ -29,6 +29,7 @@ import android.widget.EditText;
|
||||
public class ExtendedEditText extends EditText {
|
||||
|
||||
private boolean mShowImeAfterFirstLayout;
|
||||
private boolean mForceDisableSuggestions = false;
|
||||
|
||||
/**
|
||||
* Implemented by listeners of the back key.
|
||||
@@ -107,4 +108,17 @@ public class ExtendedEditText extends EditText {
|
||||
mBackKeyListener.onBackKey();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set to true when you want isSuggestionsEnabled to return false.
|
||||
* Use this to disable the red underlines that appear under typos when suggestions is enabled.
|
||||
*/
|
||||
public void forceDisableSuggestions(boolean forceDisableSuggestions) {
|
||||
mForceDisableSuggestions = forceDisableSuggestions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuggestionsEnabled() {
|
||||
return !mForceDisableSuggestions && super.isSuggestionsEnabled();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user