本文整理了Java中android.support.v7.widget.SearchView.getWindowToken()
方法的一些代码示例,展示了SearchView.getWindowToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SearchView.getWindowToken()
方法的具体详情如下:
包路径:android.support.v7.widget.SearchView
类名称:SearchView
方法名:getWindowToken
暂无
代码示例来源:origin: naman14/Timber
public void hideInputManager() {
if (mSearchView != null) {
if (mImm != null) {
mImm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);
}
mSearchView.clearFocus();
SearchHistory.getInstance(this).addSearchString(queryString);
}
}
代码示例来源:origin: aa112901/remusic
public void hideInputManager() {
if (mSearchView != null) {
if (mImm != null) {
mImm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);
}
mSearchView.clearFocus();
SearchHistory.getInstance(this).addSearchString(queryString);
}
}
代码示例来源:origin: aa112901/remusic
public void hideInputManager() {
if (mSearchView != null) {
if (mImm != null) {
mImm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);
}
mSearchView.clearFocus();
SearchHistory.getInstance(this).addSearchString(mSearchView.getQuery().toString());
}
}
代码示例来源:origin: JZ-Darkal/AndroidHttpCapture
@Override
public boolean onQueryTextSubmit(String query) {
PreviewFragment.getInstance().filterItem(query);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(searchView.getWindowToken(), 0);
return true;
}
代码示例来源:origin: byhieg/easyweather
@Override
public boolean onQueryTextSubmit(String query) {
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
if (imm != null) {
imm.hideSoftInputFromWindow(searchView.getWindowToken(), 0);
}
searchView.clearFocus();
return false;
}
代码示例来源:origin: brainysoon/cyberCar
public void hideInputManager() {
if (mSearchView != null) {
if (mImm != null) {
mImm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);
}
mSearchView.clearFocus();
SearchHistory.getInstance(this).addSearchString(queryString);
}
}
}
代码示例来源:origin: rohanoid5/Muzesto
public void hideInputManager() {
if (mSearchView != null) {
if (mImm != null) {
mImm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);
}
mSearchView.clearFocus();
SearchHistory.getInstance(this).addSearchString(queryString);
}
}
}
代码示例来源:origin: CoderLengary/WanAndroid
private void hideImn() {
InputMethodManager manager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
if (manager.isActive()) {
manager.hideSoftInputFromWindow(searchView.getWindowToken(), 0);
}
}
代码示例来源:origin: raulh82vlc/Movies-Finder
public void clearSearchFocus() {
if (mSearchView != null) {
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm.isAcceptingText()) {
imm.hideSoftInputFromWindow(mSearchView.getWindowToken(), 0);
mSearchView.clearFocus();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!