本文整理了Java中android.widget.HorizontalScrollView.canScrollHorizontally()
方法的一些代码示例,展示了HorizontalScrollView.canScrollHorizontally()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HorizontalScrollView.canScrollHorizontally()
方法的具体详情如下:
包路径:android.widget.HorizontalScrollView
类名称:HorizontalScrollView
方法名:canScrollHorizontally
暂无
代码示例来源:origin: EverythingMe/overscroll-decor
@Override
public boolean isInAbsoluteEnd() {
return !mView.canScrollHorizontally(1);
}
}
代码示例来源:origin: EverythingMe/overscroll-decor
@Override
public boolean isInAbsoluteStart() {
return !mView.canScrollHorizontally(-1);
}
代码示例来源:origin: XanderWang/elasticity
@Override
public boolean isInAbsoluteEnd() {
return !mView.canScrollHorizontally(1);
}
}
代码示例来源:origin: XanderWang/elasticity
@Override
public boolean isInAbsoluteStart() {
return !mView.canScrollHorizontally(-1);
}
代码示例来源:origin: Catrobat/Paintroid
@Test
public void testToolSelectionToolButtonCheckPosition() {
int toolCount = toolsLayout.getChildCount() - getNumberOfNotVisibleTools();
View toolButton = toolsLayout.getChildAt(toolCount / 2);
ToolType toolInMiddle = getToolTypeByButtonId(toolButton.getId());
if (toolsLayout.getWidth() > scrollView.getWidth() + toolsLayout.getChildAt(0).getWidth()) {
onToolBarView().performSelectTool(toolInMiddle);
int[] screenLocation = new int[2];
toolButton.getLocationOnScreen(screenLocation);
assertEquals("Tool button should be centered", activityHelper.getDisplayWidth() / 2, screenLocation[0] + toolButton.getWidth() / 2);
}
int scrollRight = 1;
int scrollLeft = -1;
onToolBarView().performSelectTool(ToolType.BRUSH);
assertFalse("Tool button should be most left", scrollView.canScrollHorizontally(scrollLeft));
onToolBarView().performSelectTool(ToolType.TRANSFORM);
assertFalse("Tool button should be most right", scrollView.canScrollHorizontally(scrollRight));
}
内容来源于网络,如有侵权,请联系作者删除!