本文整理了Java中android.widget.PopupWindow.setSoftInputMode()
方法的一些代码示例,展示了PopupWindow.setSoftInputMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PopupWindow.setSoftInputMode()
方法的具体详情如下:
包路径:android.widget.PopupWindow
类名称:PopupWindow
方法名:setSoftInputMode
暂无
代码示例来源:origin: jeasonlzy/NineGridView
editWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
editWindow.showAtLocation(rootView, Gravity.BOTTOM, 0, 0);
代码示例来源:origin: zyyoona7/EasyPopup
private void initContentViewAndWH() {
if (mContentView == null) {
if (mLayoutId != 0 && mContext != null) {
mContentView = LayoutInflater.from(mContext).inflate(mLayoutId, null);
} else {
throw new IllegalArgumentException("The content view is null,the layoutId=" + mLayoutId + ",context=" + mContext);
}
}
mPopupWindow.setContentView(mContentView);
if (mWidth > 0 || mWidth == ViewGroup.LayoutParams.WRAP_CONTENT || mWidth == ViewGroup.LayoutParams.MATCH_PARENT) {
mPopupWindow.setWidth(mWidth);
} else {
mPopupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT);
}
if (mHeight > 0 || mHeight == ViewGroup.LayoutParams.WRAP_CONTENT || mHeight == ViewGroup.LayoutParams.MATCH_PARENT) {
mPopupWindow.setHeight(mHeight);
} else {
mPopupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
}
//测量contentView大小
//可能不准
measureContentView();
//获取contentView的精准大小
registerOnGlobalLayoutListener();
mPopupWindow.setInputMethodMode(mInputMethodMode);
mPopupWindow.setSoftInputMode(mSoftInputMode);
}
代码示例来源:origin: pinguo-zhouwei/CustomPopwindow
/**
* 添加一些属性设置
* @param popupWindow
*/
private void apply(PopupWindow popupWindow){
popupWindow.setClippingEnabled(mClippEnable);
if(mIgnoreCheekPress){
popupWindow.setIgnoreCheekPress();
}
if(mInputMode!=-1){
popupWindow.setInputMethodMode(mInputMode);
}
if(mSoftInputMode!=-1){
popupWindow.setSoftInputMode(mSoftInputMode);
}
if(mOnDismissListener!=null){
popupWindow.setOnDismissListener(mOnDismissListener);
}
if(mOnTouchListener!=null){
popupWindow.setTouchInterceptor(mOnTouchListener);
}
popupWindow.setTouchable(mTouchable);
}
代码示例来源:origin: stackoverflow.com
private PopupWindow popupWindow;
someButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final LayoutInflater inflater = (LayoutInflater) appContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View popupView = inflater.inflate(R.layout.popupwindow_view, null, false);
popupWindow = new PopupWindow(popupView, WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
popupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
popupWindow.setOutsideTouchable(false);
CustomSearchView searchView = (CustomSearchView) popupView.findViewById(R.id.customSearchView);
popupWindow.showAsDropDown(someButton, 50, -30);
}
});
代码示例来源:origin: alidili/Demos
popupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
代码示例来源:origin: baiyuliang/QRobot
private void initPop() {
pop.setAnimationStyle(android.R.style.Animation_InputMethod);
pop.setFocusable(true);
pop.setOutsideTouchable(true);
pop.setBackgroundDrawable(new BitmapDrawable());
pop.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
}
代码示例来源:origin: stackoverflow.com
PopupWindow popup = new PopupWindow(getContext());
popup.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
popup.setContentView(view);
popup.setWidth(view.getWidth());
popup.setHeight(view.getHeight());
popup.setFocusable(true);
popup.showAsDropDown(PARENT_VIEW);
代码示例来源:origin: huangfangyi/YiChat
window.setSoftInputMode(PopupWindow.INPUT_METHOD_NEEDED);
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
代码示例来源:origin: YiChat/android_YiChat_Lite
window.setSoftInputMode(PopupWindow.INPUT_METHOD_NEEDED);
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
代码示例来源:origin: huangfangyi/YiChat
popupWindow.setBackgroundDrawable(new ColorDrawable(0x00000000));
popupWindow.setSoftInputMode(PopupWindow.INPUT_METHOD_NEEDED);
popupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
代码示例来源:origin: stackoverflow.com
pwindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
pwindow.setWidth(this.getWidth());
pwindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
代码示例来源:origin: Jay-Goo/MultiSelectPopWindow
private MultiSelectPopWindow(final Builder builder){
mBuilder = builder;
//init PopWindow
View popview = View.inflate(builder.mActivity, R.layout.multi_select_list_popwindow, null);
mPopupWindow = new PopupWindow(popview, WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.WRAP_CONTENT);
mPopupWindow.setAnimationStyle(R.style.popwindow_anim_style);
mPopupWindow.setBackgroundDrawable(new ColorDrawable(0x00000000));
mPopupWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NEEDED);
mPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mPopupWindow.setFocusable(true);
mPopupWindow.setTouchable(true);
mPopupWindow.setOutsideTouchable(builder.isOutsideTouchable);
initViews(mPopupWindow.getContentView());
initListener();
}
代码示例来源:origin: supertaohaili/book
/**
* 添加一些属性设置
* @param popupWindow
*/
private void apply(PopupWindow popupWindow){
popupWindow.setClippingEnabled(mClippEnable);
if(mIgnoreCheekPress){
popupWindow.setIgnoreCheekPress();
}
if(mInputMode!=-1){
popupWindow.setInputMethodMode(mInputMode);
}
if(mSoftInputMode!=-1){
popupWindow.setSoftInputMode(mSoftInputMode);
}
if(mOnDismissListener!=null){
popupWindow.setOnDismissListener(mOnDismissListener);
}
if(mOnTouchListener!=null){
popupWindow.setTouchInterceptor(mOnTouchListener);
}
popupWindow.setTouchable(mTouchable);
}
代码示例来源:origin: stackoverflow.com
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
内容来源于网络,如有侵权,请联系作者删除!