Popupwind简单实现
来源:互联网 发布:js实现select效果 编辑:程序博客网 时间:2024/05/22 03:28
private void showDetailsMoreWindow(View asDropDown) { if (popupWindow == null) { View view = LayoutInflater.from(this).inflate( R.layout.poupwind_details_more, null); tvDetailesMoreHome = (TextView) view.findViewById(R.id.tv_detailes_more_home); tvDetailesMoreCollect = (TextView) view.findViewById(R.id.tv_detailes_more_collect); tvDetailesMoreShare = (TextView) view.findViewById(R.id.tv_detailes_more_share); tvDetailesMoreHome.setOnClickListener(this); tvDetailesMoreCollect.setOnClickListener(this); tvDetailesMoreShare.setOnClickListener(this); popupWindow = new PopupWindow(view, WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT, false); popupWindow = new PopupWindow(view); } // 使其聚集 popupWindow.setFocusable(true); // 设置允许在外点击消失 popupWindow.setOutsideTouchable(true); // 这个是为了点击“返回Back”也能使其消失,并且并不会影响背景 popupWindow.setBackgroundDrawable(new BitmapDrawable()); // 设置SelectPicPopupWindow弹出窗体的宽 int width = this.getWindowManager().getDefaultDisplay().getWidth(); popupWindow.setWidth(WindowManager.LayoutParams.WRAP_CONTENT); // 设置SelectPicPopupWindow弹出窗体的高 popupWindow.setHeight(WindowManager.LayoutParams.WRAP_CONTENT); // 设置SelectPicPopupWindow弹出窗体动画效果// popupWindow.setAnimationStyle(R.style.PopupAnimation); popupWindow.showAsDropDown(asDropDown); }
0 0
- Popupwind简单实现
- 杀毒软件的简单实现的简单实现
- 杀毒软件的简单实现
- AXIS简单实现入门
- 俄罗斯方块的简单实现
- 简单文件系统的实现
- GinaBackDoor简单实现
- 杀毒软件的简单实现
- 杀毒软件的简单实现
- 实现简单有限状态机
- 实现简单下载代码
- 简单实现全屏对话框
- 迷宫程序简单实现
- 简单HTTP服务器实现
- strstr()的简单实现
- printf 的简单实现
- URL编码简单实现
- frame简单实现导航
- dSYM文件分析
- Runtime
- Xcode Package Manager 安装
- 关于数据库备份的定义和重要性
- 仔细体验,我想从产品设计的角度分析分析微信的声音锁
- Popupwind简单实现
- springMVC文件转换问题
- Deep Learning(深度学习)学习笔记整理系列之(三)
- 定制UItextfield
- 在JSP中引入不了标签库,但是标签库存在,却依旧报错Can not find the tag library descriptor for ......
- 二叉树中和为某一值的路径
- ngnix
- Android中画廊视图Gallery和ImageSwitcher组件的使用(十三)
- Caused by: java.net.ConnectException: Connection timed out: connect||Caused by: com.mysql.jdbc.excep