android.widget.ScrollView.getLocationOnScreen()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中android.widget.ScrollView.getLocationOnScreen()方法的一些代码示例,展示了ScrollView.getLocationOnScreen()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollView.getLocationOnScreen()方法的具体详情如下:
包路径:android.widget.ScrollView
类名称:ScrollView
方法名:getLocationOnScreen

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);

相关文章

ScrollView类方法