本文整理了Java中android.widget.AutoCompleteTextView.getWindowToken()
方法的一些代码示例,展示了AutoCompleteTextView.getWindowToken()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AutoCompleteTextView.getWindowToken()
方法的具体详情如下:
包路径:android.widget.AutoCompleteTextView
类名称:AutoCompleteTextView
方法名:getWindowToken
暂无
代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android
@Override
public void onMarkerDragStart(Marker marker) {
InputMethodManager imm = (InputMethodManager) MainFragment.this.getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTbEndLocation.getWindowToken(), 0);
imm.hideSoftInputFromWindow(mTbStartLocation.getWindowToken(), 0);
}
};
代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android
@Override
public void onDrawerSlide(View arg0, float arg1) {
InputMethodManager imm = (InputMethodManager) MainFragment.this.getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTbEndLocation.getWindowToken(), 0);
imm.hideSoftInputFromWindow(mTbStartLocation.getWindowToken(), 0);
}
代码示例来源:origin: MKergall/osmbonuspack
public void onClick(View v) {
//Hide the soft keyboard:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(poiTagText.getWindowToken(), 0);
//Start search:
String feature = poiTagText.getText().toString();
if (!feature.equals(""))
Toast.makeText(v.getContext(), "Searching:\n"+feature, Toast.LENGTH_LONG).show();
getPOIAsync(feature);
}
});
代码示例来源:origin: posm/OpenMapKitAndroid
@Override
public void onPause() {
super.onPause();
// Close keyboard if open
InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(tagValueEditText.getWindowToken(), 0);
}
代码示例来源:origin: henrichg/PhoneProfilesPlus
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// Hide the keyboard since the user explicitly selected an item.
InputMethodManager manager =
(InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
manager.hideSoftInputFromWindow(mAutoCompleteTextView.getWindowToken(), 0);
// An onClickListener for the view item because I haven't figured out a
// way to update the AutoCompleteTextView without causing an infinite loop.
mHideFilterSearchOnStart = true;
mFilterAdapter.onClick(view);
}
代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android
@Override
public void onMapClick(LatLng latlng) {
InputMethodManager imm = (InputMethodManager) MainFragment.this.getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTbEndLocation.getWindowToken(), 0);
imm.hideSoftInputFromWindow(mTbStartLocation.getWindowToken(), 0);
if (mTbStartLocation.hasFocus()) {
setMarker(true, latlng, true, true);
} else {
setMarker(false, latlng, true, true);
}
processRequestTrip();
}
};
代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android
@Override
public void onMapLongClick(LatLng latlng) {
InputMethodManager imm = (InputMethodManager) MainFragment.this.getActivity()
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mTbEndLocation.getWindowToken(), 0);
imm.hideSoftInputFromWindow(mTbStartLocation.getWindowToken(), 0);
final LatLng latLngFinal = latlng;
final CharSequence[] items = {mApplicationContext.getResources()
.getString(R.string.point_type_selector_start_marker_option),
mApplicationContext.getResources()
.getString(R.string.point_type_selector_end_marker_option)};
AlertDialog.Builder builder = new AlertDialog.Builder(
MainFragment.this.getActivity());
builder.setTitle(getResources().getString(R.string.point_type_selector_title));
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
if (item == 0) {
setMarker(true, latLngFinal, true, true);
} else {
setMarker(false, latLngFinal, true, true);
}
processRequestTrip();
}
});
AlertDialog alert = builder.create();
alert.show();
}
};
代码示例来源:origin: CUTR-at-USF/OpenTripPlanner-for-Android
imm.hideSoftInputFromWindow(mTbEndLocation.getWindowToken(), 0);
imm.hideSoftInputFromWindow(mTbStartLocation.getWindowToken(), 0);
代码示例来源:origin: zadr50/Gojek
@Override
public void onResult(PlaceBuffer places) {
if( places.getStatus().isSuccess() ) {
Place place = places.get( 0 );
mPlaceTujuan=place;
displayPlace( place );
mPredictTextView.setText( "" );
mPredictTextView.clearFocus();
mAdapter.clear();
// Check if no view has focus:
if (mPredictTextView.hasFocus()) {
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mPredictTextView.getWindowToken(), 0);
}
}
//Release the PlaceBuffer to prevent a memory leak
places.release();
}
} );
代码示例来源:origin: TUM-Dev/Campus-Android
imm.hideSoftInputFromWindow(searchView.getWindowToken(), 0);
return true;
内容来源于网络,如有侵权,请联系作者删除!