/**
* 判断当前用户触摸是否超出了Dialog的显示区域
*
* @param context
* @param event
* @return
*/
private boolean isOutOfBounds(Context context, MotionEvent event) {
final int x = (int) event.getX();
final int y = (int) event.getY();
final int slop = ViewConfiguration.get(context).getScaledWindowTouchSlop();
final View decorView = getWindow().getDecorView();
return (x < -slop) || (y < -slop) || (x > (decorView.getWidth() + slop))
|| (y > (decorView.getHeight() + slop));
}
BaseDialog.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:anyRTC-RTCP-Android
作者:
评论列表
文章目录