/** * 检测制定View是否被遮住显示不全 * @return*/
protected boolean isCover(View view) {
boolean cover = false;
Rect rect = new Rect();
cover = view.getGlobalVisibleRect(rect);
if (cover) {
if (rect.width() >= view.getMeasuredWidth() && rect.height() >= view.getMeasuredHeight()) {
return !cover;
}
}
return true;
}
网友评论