Android: how to check if a View inside of ScrollView is visible?

Solutions:

Rect scrollBounds = new Rect();scrollView.getHitRect(scrollBounds);if (childView.getLocalVisibleRect(scrollBounds)) {    //子控件至少有一个像素在可视范围内    // Any portion of the childView, even a single pixel, is within the visible window } else {     //子控件完全不在可视范围内    // NONE of the childView is within the visible window } 

更多相关文章

  1. 控件:拖动条 --- SeekBar(改变屏幕亮度)
  2. android自定义支持横竖方向切换seekbar控件
  3. Android中AutoCompleteTextView控件的使用
  4. 使用命令行ls命令的Android文件浏览控件,适合于root过的设备,可以
  5. Android学习笔记(二)android studio基本控件及布局(实现图片查看器)
  6. android spinner控件自定义选择图层
  7. android代码编写布局和控件
  8. 实现Android的图片画廊控件ScrollGalleryView
  9. Android Widget添加自定义控件

随机推荐

  1. Android(安卓)Studio下的目录结构
  2. Android的多媒体框架OpenCore介绍
  3. Android逆向之旅---Android中的sharedUse
  4. Android属性动画使用浅析
  5. android(NDK+JNI)---Android使用JNI实现J
  6. android源码
  7. Android可折叠收缩伸展的Expandable分组R
  8. Android开发学习之基本控件概览
  9. 我和我的Android
  10. Android(安卓)Studio 第六十四期 - Andro