Android 7.0 PopupWindow 的showAsDropDown(View v)适配
来源:互联网 发布:用工作站玩游戏知乎 编辑:程序博客网 时间:2024/05/20 13:08
问题描述: popupWindow使用popupwidow 使用showAsDropDown 显示在自定控件之下,在7.0之前的系统能显示正常,在7.0的系统不能正确的显示指定控件的下方
解决方案: 重写public void showAsDropDown(View anchor);
@Override
public void showAsDropDown(View anchor) { if (Build.VERSION.SDK_INT >= 24) {// 只有7.0 的系统有这个问题 mEditText.setFocusable(false); HideKeyboard(mEditText); int[] location = new int[2]; anchor.getLocationOnScreen(location); int x = location[0]; int y = location[1]; showAtLocation(anchor, Gravity.NO_GRAVITY, 0, y + anchor.getHeight()); } else { super.showAsDropDown(anchor); }}
阅读全文
0 0
- Android 7.0 PopupWindow 的showAsDropDown(View v)适配
- 在Android 7.0上PopupWindow.showAsDropDown不起作用的解决方法
- 在Android 7.0上PopupWindow.showAsDropDown不起作用的解决方法
- 在Android 7.0上PopupWindow.showAsDropDown不起作用的解决方法
- android 7.0 PopupWindow中ShowAsDropDown()方法不适配的解决方案
- android popupwindow showAsDropDown offsetx无效的问题
- 在Android 7.0上PopupWindow.showAsDropDown不起作用
- Android开发之PopupWindow的showAtLocation()和showAsDropDown()
- Popupwindow的showAsDropDown方法详解
- 解决在Android 7.0上PopupWindow.showAsDropDown不起作用
- android弹出框之.showAsDropDown(View anchor, int xoff, int yoff):PopupWindow使用详解
- PopupWindow的使用showAsDropDown()无法dismiss解决方法
- PopupWindow的showAsDropDown位置问题 Android7.0
- (原创)关于PopupWindow的showAsDropDown()和showAtLocation()使用方式及其区别
- android7.0-PopupWindow-showAsDropDown
- Android下PopupWindow隐藏及显示(showAtLocation/showAsDropDown)
- Android下PopupWindow隐藏及显示(showAtLocation/showAsDropDown)
- Android下PopupWindow隐藏及显示(showAtLocation/showAsDropDown)
- 全连接层的作用
- [python3.6 flask web学习]Flask用户权限管理
- Android7.0应用程序自助更新跳转安装界面出现解析包出错
- Android 简单的点击震动
- 关于在JetBrains WebStorm 2017.2 x64上配置本地服务器(apache)
- Android 7.0 PopupWindow 的showAsDropDown(View v)适配
- python中map多进程使用方法
- hibernate注解之单/双向多对一映射
- new一个对象的时候JVM都做了那些事情
- telnet 命令发送HTTP请求报文
- Html Css 未掌握的地方回顾复习
- 漂亮回答面试官struts2的原理
- 简单选择排序、直接插入排序、归并排序
- 案例:数据库open时报错ORA-1172,ORA-1151 处理