摘要: 宽高一定要设置否者设置宽高时,(popupwindow)需要注意高度要减去顶部状态栏的高度 (如果你的activity是全屏模式的话,可以不用处理)当然我们也可以自己设置高度 比如可以设置屏幕高度的一半或者其他 //获取顶部状态栏的高度val resourceId: Int = context.re 阅读全文
posted @ 2020-08-20 18:24 荣超 阅读(568) 评论(0) 推荐(0)
摘要: val resourceId: Int = activity.resources.getIdentifier("status_bar_height", "dimen", "android") val statusBarHeight: Int = activity.resources.getDimen 阅读全文
posted @ 2020-08-20 18:07 荣超 阅读(4026) 评论(0) 推荐(1)
摘要: 显示输入法 val manager = context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager? manager?.showSoftInput(v, InputMethodManager.SHOW_I 阅读全文
posted @ 2020-08-20 16:01 荣超 阅读(762) 评论(0) 推荐(0)