本文整理了Java中android.widget.AutoCompleteTextView.onFocusChanged()
方法的一些代码示例,展示了AutoCompleteTextView.onFocusChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AutoCompleteTextView.onFocusChanged()
方法的具体详情如下:
包路径:android.widget.AutoCompleteTextView
类名称:AutoCompleteTextView
方法名:onFocusChanged
暂无
代码示例来源:origin: vekexasia/android-edittext-validator
/**
* In onFocusChanged() we also have to reshow the error icon as the Editor
* hides it. Because Editor is a hidden class we need to cache the last used
* icon and use that
*/
@Override
protected void onFocusChanged(boolean focused, int direction,
Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
showErrorIconHax(lastErrorIcon);
}
代码示例来源:origin: wasdennnoch/AndroidN-ify
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
showDropDownIfFocused();
}
代码示例来源:origin: com.actionbarsherlock/actionbarsherlock
@Override
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
mSearchView.onTextFocusChanged();
}
代码示例来源:origin: Lesilva/BetterSpinner
@Override
protected void onFocusChanged(boolean focused, int direction,
Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
if (focused) {
performFiltering("", 0);
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(getWindowToken(), 0);
setKeyListener(null);
dismissDropDown();
} else {
isPopup = false;
}
}
代码示例来源:origin: MKergall/osmbonuspack
@Override protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
super.onFocusChanged(focused, direction, previouslyFocusedRect);
if (focused){
setPreferences();
if (getAdapter()!=null) {
performFiltering(getText(), 0);
}
}
}
代码示例来源:origin: neopixl/PixlUI
/**
* Used to intercept the focus
*/
@Override
protected void onFocusChanged(boolean focused, int direction,
Rect previouslyFocusedRect) {
AutoCompleteEditTextFocusListener listener = getFocusListener();
if (listener != null) {
if (focused) {
listener.requestFocus(this);
} else {
listener.loseFocus(this);
}
}
super.onFocusChanged(focused, direction, previouslyFocusedRect);
if (mAutoFocus) {
if (focused) {
mImm.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT | InputMethodManager.SHOW_FORCED);
} else {
mImm.hideSoftInputFromWindow(this.getWindowToken(), 0);
}
mImm.toggleSoftInput(0, 0);
}
}
内容来源于网络,如有侵权,请联系作者删除!