84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
需求是点击popupwindow 外部,popupwindow不消失。目前 Android 6.0 以下的系统均没问题,但是6.0的系统上面点击popupwindow外部以后popupwindow 消失。哪位大佬知道的说下哦。
同时一并问下6.0系统中使用 ContextCompat.checkSelfPermission 同时检查 读,写联系人权限如何实现?
popupWindow.setFocusable(false); popupWindow.setTouchable(true); popupWindow.setBackgroundDrawable(new BitmapDrawable()); popupWindow.setOutsideTouchable(false); popupWindow.update();
我试了下,貌似有效果
When window touchable is true, focusable is false,setOutsideTouchable() works. pw.setTouchable(true); pw.setFocusable(false); pw.setOutsideTouchable(false); 记得给我加分哦!!!thx!
When window touchable is true, focusable is false,setOutsideTouchable() works.
pw.setTouchable(true); pw.setFocusable(false); pw.setOutsideTouchable(false); 记得给我加分哦!!!thx!
检查权限: 读权限: ContextCompat.checkSelfPermission(mContext, Manifest.permission.READ_CONTACTS) == PackageManager.PERMISSION_GRANTED; 写权限: ContextCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_CONTACTS) == PackageManager.PERMISSION_GRANTED; 判断时添加&&用于判断两个条件是否return true 请求权限: 第一步:String[] permissions = {Manifest.permission.READ_CONTACTS,Manifest.permission.WRITE_CONTACTS} 第二步:ActivityCompat.requestPermissions(activity, permissions,requestCode);
我试了下,貌似有效果