本文整理了Java中android.support.v7.widget.SearchView.getQuery()
方法的一些代码示例,展示了SearchView.getQuery()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SearchView.getQuery()
方法的具体详情如下:
包路径:android.support.v7.widget.SearchView
类名称:SearchView
方法名:getQuery
暂无
代码示例来源:origin: square/assertj-android
public SearchViewAssert hasQuery(CharSequence query) {
isNotNull();
CharSequence actualQuery = actual.getQuery();
assertThat(actualQuery) //
.overridingErrorMessage("Expected query <%s> but was <%s>.", query, actualQuery) //
.isEqualTo(query);
return this;
}
代码示例来源: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 void onResume() {
super.onResume();
// 这里为了解决返回后焦点在搜索栏的bug
if(recyclerView!=null) {
recyclerView.requestFocus();
if(((MainActivity)getActivity()).searchView!=null) {
filterItem(((MainActivity) getActivity()).searchView.getQuery());
}
}
}
}
代码示例来源:origin: szpnygo/NoWordsChat
@Override
public String getQuery() {
if (mSearchView != null)
return mSearchView.getQuery().toString();
return "";
}
}
代码示例来源:origin: aint/laverna-android
@Override
public String getSearchQuery() {
return mSearchView.getQuery().toString();
}
代码示例来源:origin: aint/laverna-android
@Override
public String getSearchQuery() {
return mSearchView.getQuery().toString();
}
代码示例来源:origin: aint/laverna-android
@Override
public String getSearchQuery() {
return mSearchView.getQuery().toString();
}
代码示例来源:origin: aint/laverna-android
@Override
public String getSearchQuery() {
return mSearchView.getQuery().toString();
}
代码示例来源:origin: aint/laverna-android
@Override
public String getSearchQuery() {
return mSearchView.getQuery().toString();
}
代码示例来源:origin: openmrs/openmrs-contrib-android-client
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
String query = searchView.getQuery().toString();
outState.putString(ApplicationConstants.BundleKeys.PATIENT_QUERY_BUNDLE, query);
}
代码示例来源:origin: openmrs/openmrs-contrib-android-client
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
String query = findPatientView.getQuery().toString();
outState.putString(ApplicationConstants.BundleKeys.PATIENT_QUERY_BUNDLE, query);
}
代码示例来源:origin: algolia/instantsearch-android
/**
* Returns the query string currently in the text field.
*
* @return the query string
*/
@NonNull public CharSequence getQuery() {
if (searchView != null) {
return searchView.getQuery();
} else if (supportView != null) {
return supportView.getQuery();
}
throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
}
代码示例来源:origin: Odoo-mobile/framework
@Override
public boolean onClose() {
// Restore the SearchView if a query was entered
if (!TextUtils.isEmpty(mSearchView.getQuery())) {
mSearchView.setQuery(null, true);
}
mOnSearchViewChangeListener.onSearchViewClose();
return true;
}
};
代码示例来源:origin: axxapy/apkExtractor
@Override
public void onFocusChange(View view, boolean queryTextFocused) {
if (!queryTextFocused && searchView.getQuery().length() < 1) {
getSupportActionBar().collapseActionView();
}
}
});
代码示例来源:origin: avluis/Hentoid
} else if (totalContent > MAX_ATTRIBUTES_DISPLAYED) {
SearchView tagSearchView = searchPane.findViewById(R.id.tag_filter);
String searchQuery = tagSearchView.getQuery().toString();
内容来源于网络,如有侵权,请联系作者删除!