android.widget.PopupWindow.setWindowLayoutType()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(331)

本文整理了Java中android.widget.PopupWindow.setWindowLayoutType()方法的一些代码示例,展示了PopupWindow.setWindowLayoutType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。PopupWindow.setWindowLayoutType()方法的具体详情如下:
包路径:android.widget.PopupWindow
类名称:PopupWindow
方法名:setWindowLayoutType

PopupWindow.setWindowLayoutType介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

pw.setWindowLayoutType(WindowManager.LayoutParams.TYPE_TOAST);
pw.showAtLocation(layout, Gravity.CENTER | Gravity.TOP, 0, 500);

代码示例来源:origin: osfans/trime

@Override
public View onCreateCandidatesView() {
 LayoutInflater inflater = getLayoutInflater();
 mCompositionContainer =
   (LinearLayout) inflater.inflate(R.layout.composition_container, (ViewGroup) null);
 hideComposition();
 mFloatingWindow = new PopupWindow(mCompositionContainer);
 mFloatingWindow.setClippingEnabled(false);
 mFloatingWindow.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
 mFloatingWindow.setWindowLayoutType(getDialogType());
 mComposition = (Composition) mCompositionContainer.getChildAt(0);
 mCandidateContainer =
   (FrameLayout) inflater.inflate(R.layout.candidate_container, (ViewGroup) null);
 mCandidate = (Candidate) mCandidateContainer.findViewById(R.id.candidate);
 mCandidate.setCandidateListener(this);
 setShowComment(!Rime.getOption("_hide_comment"));
 mCandidate.setVisibility(!Rime.getOption("_hide_candidate") ? View.VISIBLE : View.GONE);
 loadBackground();
 return mCandidateContainer;
}

相关文章