获取组件的绝对坐标位置然后判断int[] location = new int[2] ;view.getLocationInWindow(location); //获取在当前窗口内的绝对坐标view.getLocationOnScreen(location);//获取在整个屏幕内的绝对坐标location [0]--->x坐标,location [1]--->y坐标这种方法比较土. 楼上正解.
组件的左边缘(getLeft())>屏幕宽度或者右边缘(getRight())<0