本文整理了Java中android.widget.ScrollView.getLocationOnScreen()
方法的一些代码示例,展示了ScrollView.getLocationOnScreen()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollView.getLocationOnScreen()
方法的具体详情如下:
包路径:android.widget.ScrollView
类名称:ScrollView
方法名:getLocationOnScreen
暂无
代码示例来源:origin: blurpy/kouchat-android
private static Rect getVisibleScrollArea(final ScrollView scrollView) {
final int[] locationOnScreen = new int[2];
scrollView.getLocationOnScreen(locationOnScreen);
return new Rect(
locationOnScreen[0], // left position
locationOnScreen[1], // top position
locationOnScreen[0] + scrollView.getWidth(), // right position
locationOnScreen[1] + scrollView.getHeight()); // bottom position
}
代码示例来源:origin: jakebonk/DraggableTreeView
mobileView.getLocationOnScreen(location);
int root_location[] = new int[2];
mRootLayout.getLocationOnScreen(root_location);
int offsetX = deltaX-root_location[0];
int offsetY = location[1]+deltaY-root_location[1]+mRootLayout.getScrollY()-mScrollDownY;
代码示例来源:origin: jakebonk/BoardView
int[] parentLocation = new int[2];
ScrollView parent = ((ScrollView)((LinearLayout)mobileView.getParent()).getParent());
parent.getLocationOnScreen(parentLocation);
if(mLastEventY < parentLocation[1]+200){
parent.smoothScrollBy(0,-10);
代码示例来源:origin: jakebonk/DraggableTreeView
mRootLayout.getLocationOnScreen(root_location);
if(root_location[1] > mLastEventY - dpToPx(25)){
mRootLayout.smoothScrollBy(0,-10);
内容来源于网络,如有侵权,请联系作者删除!