本文整理了Java中android.widget.HorizontalScrollView.getScrollX()
方法的一些代码示例,展示了HorizontalScrollView.getScrollX()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HorizontalScrollView.getScrollX()
方法的具体详情如下:
包路径:android.widget.HorizontalScrollView
类名称:HorizontalScrollView
方法名:getScrollX
暂无
代码示例来源:origin: huburt-Hu/NewbieGuide
int scrollX = horizontalScrollView.getScrollX();
LogUtil.i("scrollX:" + scrollX);
result.left -= scrollX;
代码示例来源:origin: stackoverflow.com
public void run() {
horizontalScrollView.smoothScrollTo(
(int) horizontalScrollView.getScrollX()
+ viewWidth,
(int) horizontalScrollView.getScrollY());
public void run() {
horizontalScrollView.smoothScrollTo(
(int) horizontalScrollView.getScrollX()
- viewWidth,
(int) horizontalScrollView.getScrollY());
代码示例来源:origin: hackware1993/MagicIndicator
if (mScrollView.getScrollX() > current.mLeft) {
if (mSmoothScroll) {
mScrollView.smoothScrollTo(current.mLeft, 0);
mScrollView.scrollTo(current.mLeft, 0);
} else if (mScrollView.getScrollX() + getWidth() < current.mRight) {
if (mSmoothScroll) {
mScrollView.smoothScrollTo(current.mRight - getWidth(), 0);
代码示例来源:origin: tianshaojie/AndroidFine
@Override
protected boolean isReadyForPullStart() {
return mRefreshableView.getScrollX() == 0;
}
代码示例来源:origin: tianshaojie/AndroidFine
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: OCNYang/QBox
if (mScrollView.getScrollX() > current.mLeft) {
if (mSmoothScroll) {
mScrollView.smoothScrollTo(current.mLeft, 0);
mScrollView.scrollTo(current.mLeft, 0);
} else if (mScrollView.getScrollX() + getWidth() < current.mRight) {
if (mSmoothScroll) {
mScrollView.smoothScrollTo(current.mRight - getWidth(), 0);
代码示例来源:origin: myxh/CoolShopping
@Override
protected boolean isReadyForPullStart() {
return mRefreshableView.getScrollX() == 0;
}
代码示例来源:origin: com.albedinsky.android/ui-widget-layout
/**
*/
@Override
public boolean isScrolledAtStart() {
return mScrollableView.getScrollX() == 0;
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
public boolean isScrolledAtStart() {
return mScrollableView.getScrollX() == 0;
}
代码示例来源:origin: shanyao0/SimpleApp
@Override
protected boolean isReadyForPullStart() {
return mRefreshableView.getScrollX() == 0;
}
代码示例来源:origin: gdpancheng/LoonAndroid3
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: myxh/CoolShopping
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: shanyao0/SimpleApp
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: Wan7451/Wan_RecycleViewAdapter
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: kaku2015/WeatherAlarmClock
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: huangfangyi/FanXin
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: alienjun/AJWaveRefreshForAndroid
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollX() >= (scrollViewChild.getWidth() - getWidth());
}
return false;
}
代码示例来源:origin: com.albedinsky.android/ui-widget-layout
/**
*/
@Override
public boolean isScrolledAtEnd() {
final View view = mScrollableView.getChildAt(0);
return view != null && (view.getWidth() - mScrollableView.getWidth()) == mScrollableView.getScrollX();
}
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
public boolean isScrolledAtEnd() {
final View view = mScrollableView.getChildAt(0);
return view != null && (view.getWidth() - mScrollableView.getWidth()) == mScrollableView.getScrollX();
}
}
代码示例来源:origin: stackoverflow.com
HorizontalScrollView scroller;
int scrollerWidth = scroller.getMeasuredWidth();
int scrollX = scroller.getScrollX();
int activeViewCount = 0;
activeViewCount = (activeViewCount > 0) ? activeViewCount - 1 : 0;
scroller.smoothScrollTo(activeViewCount * scrollerWidth, 0);
if (scrollX >= scrollerWidth) {
scroller.scrollTo(0, 0);
}
内容来源于网络,如有侵权,请联系作者删除!