本文整理汇总了Java中android.widget.ImageView.getGlobalVisibleRect方法的典型用法代码示例。如果您正苦于以下问题:Java ImageView.getGlobalVisibleRect方法的具体用法?Java ImageView.getGlobalVisibleRect怎么用?Java ImageView.getGlobalVisibleRect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.ImageView
的用法示例。
在下文中一共展示了ImageView.getGlobalVisibleRect方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: computeBoundsBackward
import android.widget.ImageView; //导入方法依赖的package包/类
/**
* 查找信息
* 从第一个完整可见item逆序遍历,如果初始位置为0,则不执行方法内循环
*/
private void computeBoundsBackward(int firstCompletelyVisiblePos) {
for (int i = firstCompletelyVisiblePos;i < mThumbViewInfoList.size(); i++) {
View itemView = mGridLayoutManager.findViewByPosition(i);
Rect bounds = new Rect();
if (itemView != null) {
ImageView thumbView = (ImageView) itemView.findViewById(R.id.iv);
thumbView.getGlobalVisibleRect(bounds);
}
mThumbViewInfoList.get(i).setBounds(bounds);
}
}
示例2: computeBoundsBackward
import android.widget.ImageView; //导入方法依赖的package包/类
/**
* 查找信息
* 从第一个完整可见item逆序遍历,如果初始位置为0,则不执行方法内循环
*/
private void computeBoundsBackward(int firstCompletelyVisiblePos) {
for (int i = firstCompletelyVisiblePos;i < mThumbViewInfoList.size(); i++) {
View itemView = listView.getChildAt(i-firstCompletelyVisiblePos);
Rect bounds = new Rect();
if (itemView != null) {
ImageView thumbView = (ImageView) itemView.findViewById(R.id.iv);
thumbView.getGlobalVisibleRect(bounds);
}
mThumbViewInfoList.get(i).setBounds(bounds);
}
}
示例3: computeBoundsBackward
import android.widget.ImageView; //导入方法依赖的package包/类
/**
* 查找信息
* 从第一个完整可见item逆序遍历,如果初始位置为0,则不执行方法内循环
*/
private void computeBoundsBackward(int firstCompletelyVisiblePos) {
for (int i = firstCompletelyVisiblePos; i < mThumbViewInfoList.size(); i++) {
View itemView = listView.getChildAt(i - firstCompletelyVisiblePos);
Rect bounds = new Rect();
if (itemView != null) {
ImageView thumbView = (ImageView) itemView.findViewById(R.id.iv);
thumbView.getGlobalVisibleRect(bounds);
}
mThumbViewInfoList.get(i).setBounds(bounds);
}
}
示例4: computeBoundsBackward
import android.widget.ImageView; //导入方法依赖的package包/类
/**
* 查找信息
* @param list 图片集合
*/
private void computeBoundsBackward(List<UserViewInfo> list) {
for (int i = 0;i < mNglContent.getChildCount(); i++) {
View itemView = mNglContent.getChildAt(i);
Rect bounds = new Rect();
if (itemView != null) {
ImageView thumbView = (ImageView) itemView;
thumbView.getGlobalVisibleRect(bounds);
}
list.get(i).setBounds(bounds);
list.get(i).setUrl(list.get(i).getUrl());
}
}
示例5: computeBoundsBackward
import android.widget.ImageView; //导入方法依赖的package包/类
/**
* 查找信息
* 从第一个完整可见item逆序遍历,如果初始位置为0,则不执行方法内循环
*/
private void computeBoundsBackward(int firstCompletelyVisiblePos) {
for (int i = firstCompletelyVisiblePos; i < mThumbViewInfoList.size(); i++) {
View itemView = listView.getChildAt(i - firstCompletelyVisiblePos);
Rect bounds = new Rect();
if (itemView != null) {
//需要显示过度控件
ImageView thumbView = (ImageView) itemView.findViewById(R.id.iv);
//拿到在控件屏幕可见中控件显示为矩形Rect信息
thumbView.getGlobalVisibleRect(bounds);
}
mThumbViewInfoList.get(i).setBounds(bounds);
}
}