ListPopupWindow的简单使用
来源:互联网 发布:java ocr身份证识别 编辑:程序博客网 时间:2024/04/26 19:04
private void setListPopupWindow(){ listPopupWindow = new ListPopupWindow(this); listPopupWindow.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,new String[]{"hello","world","welcom"})); listPopupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT); listPopupWindow.setWidth(ViewGroup.LayoutParams.WRAP_CONTENT); listPopupWindow.setAnchorView(show_btn);//设置ListPopupWindow的锚点,即关联PopupWindow的显示位置和这个锚点 此处show_btn为按钮 listPopupWindow.setModal(true);//设置是否是模式 listPopupWindow.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { listPopupWindow.dismiss(); } }); listPopupWindow.show(); }
0 0
- ListPopupWindow的简单使用
- ListPopupWindow 的简单实现
- Android ListPopupWindow的使用
- ListPopupWindow的使用
- ListPopupWindow 和 PopupMenu的使用
- 0104 wrrkmigua ListPopupWindow的使用
- ListPopupWindow的使用:popupwindow加载listview
- ListPopupWindow
- ListPopupWindow使用完整示例(二)——自定义ListPopupWindow
- ListPopupWindow使用完整示例(一)——系统自带ListPopupWindow
- EditText+ListPopupWindow实现可编辑的下拉列表
- ListPopupWindow,PopupMenu
- ListPopupWindow用法
- Android之ListPopupWindow
- Android Material Design:ListPopupWindow
- listpopupwindow和popupwindow
- 下拉列表ListPopupWindow
- ListPopupWindow宽度自适应
- Birds in Forest
- Python 读取图片文件为矩阵和保存矩阵为图片
- 编程过程中遇到的错误
- 2016123
- Qt在Windows下的三种编程环境搭建
- ListPopupWindow的简单使用
- Spring
- 二叉树的遍历操作
- Opengl 和 GLSL版本对应关系
- bean->map或map->bean的工具类主要针对基本类型
- MFC中的winmain
- web安全基础
- 集合的并查
- Shell部分16