当前位置: 首页>>代码示例>>Java>>正文


Java ViewPager.SCROLL_STATE_SETTLING属性代码示例

本文整理汇总了Java中android.support.v4.view.ViewPager.SCROLL_STATE_SETTLING属性的典型用法代码示例。如果您正苦于以下问题:Java ViewPager.SCROLL_STATE_SETTLING属性的具体用法?Java ViewPager.SCROLL_STATE_SETTLING怎么用?Java ViewPager.SCROLL_STATE_SETTLING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.support.v4.view.ViewPager的用法示例。


在下文中一共展示了ViewPager.SCROLL_STATE_SETTLING属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onPageScrollStateChanged

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@Override
public void onPageScrollStateChanged(int state) {
    switch (state) {
        case ViewPager.SCROLL_STATE_IDLE: {
            invalidateOptionsMenu();

            mCurrentPosition = mNextPosition;
            break;
        }
        case ViewPager.SCROLL_STATE_DRAGGING:
        case ViewPager.SCROLL_STATE_SETTLING:
        default:
            break;
    }
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:16,代码来源:Codecs.java

示例2: onPageScrollStateChanged

@Override
public void onPageScrollStateChanged(int state) {
    switch (state) {
        case ViewPager.SCROLL_STATE_IDLE: {
            if (mCurrentPosition >= 0) {
                sendFragmentVisibilityChange(mCurrentPosition, false);
            }
            if (mNextPosition >= 0) {
                sendFragmentVisibilityChange(mNextPosition, true);
            }
            supportInvalidateOptionsMenu();

            mCurrentPosition = mNextPosition;
            break;
        }
        case ViewPager.SCROLL_STATE_DRAGGING:
            clearDetails();
            hasClearedDetails = true;
            break;
        case ViewPager.SCROLL_STATE_SETTLING:
            hasClearedDetails = false;
            break;
        default:
            break;
    }
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:26,代码来源:SipHome.java

示例3: onPageScrollStateChanged

@Override
public void onPageScrollStateChanged(int state) {

  /**
   * @[email protected]
   *
   *  add scrollstart & scrollend event
   *
   */
  switch (state) {
    case ViewPager.SCROLL_STATE_IDLE:
      lastPositionOffset = 99f;
      target.fireEvent("scrollend");
      break;
    case ViewPager.SCROLL_STATE_DRAGGING:
      target.fireEvent("scrollstart");
      break;
    case ViewPager.SCROLL_STATE_SETTLING:
      break;

  }
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:22,代码来源:WXSlider.java

示例4: onPageScrolled

@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
    if (currentPagerState != ViewPager.SCROLL_STATE_SETTLING) {
        if (positionOffset >= 0.5) {
            onPageSelected(position + 1);
        } else if (positionOffset <= -0.5) {
            onPageSelected(position - 1);
        } else {
            onPageSelected(position);
        }
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:MaterialViewPager.java

示例5: onPageScrollStateChanged

/**
 * viewpager状态监听
 * @param state
 */
@Override
public void onPageScrollStateChanged(int state) {
    if (state == ViewPager.SCROLL_STATE_IDLE) {  // 0 空闲状态  pager处于空闲状态
        scrollToChild(viewPager.getCurrentItem(), 0);
    }else if(state == ViewPager.SCROLL_STATE_SETTLING){ // 2 正在自动沉降,相当于松手后,pager恢复到一个完整pager的过程

    }else if(state == ViewPager.SCROLL_STATE_DRAGGING){  // 1 viewpager正在被滑动,处于正在拖拽中

    }
}
 
开发者ID:xfangfang,项目名称:NeuTV,代码行数:14,代码来源:TabStrip.java

示例6: onPageScrollStateChanged

@Override
public void onPageScrollStateChanged(int state) {
    if (this.state == ViewPager.SCROLL_STATE_SETTLING && state == ViewPager.SCROLL_STATE_IDLE) {
        ExposureManager.getInstance().triggerViewCalculate(TrackerInternalConstants.TRIGGER_VIEW_CHANGED, mRootLayout, mCommonInfo, mRootLayout.getLastVisibleViewMap());
    }
    this.state = state;
}
 
开发者ID:alibaba,项目名称:android_viewtracker,代码行数:7,代码来源:ReuseLayoutHook.java

示例7: onPageScrollStateChanged

@Override
        public void onPageScrollStateChanged(int state) {
            //ViewPager.SCROLL_STATE_IDLE 空闲状态 0;CustormViewPager.SCROLL_STATE_DRAGGING 正在滑动 1
            //ViewPager.SCROLL_STATE_SETTLING 滑动完毕 2;页面开始滑动时,状态变化(1,2,0)
            if (state == ViewPager.SCROLL_STATE_DRAGGING) {
                isScrolling = true;
            } else {
                isScrolling = false;
            }
            if (state == ViewPager.SCROLL_STATE_SETTLING) {
//                Log.i("CustormViewPager", "----------------right =>" + right + "; left =>" + left + "----------------------------");
                right = left = false;
//                lastValue = -1;
            }
        }
 
开发者ID:DyncKathline,项目名称:LiveGiftLayout,代码行数:15,代码来源:GiftPanelControl.java

示例8: onPageScrollStateChanged

@Override
public void onPageScrollStateChanged(int state) {
    switch (state) {
        case ViewPager.SCROLL_STATE_IDLE:
            setData();
            break;
        case ViewPager.SCROLL_STATE_DRAGGING:
            break;
        case ViewPager.SCROLL_STATE_SETTLING:
            break;
    }
}
 
开发者ID:kamisakihideyoshi,项目名称:TaipeiTechRefined,代码行数:12,代码来源:CalendarFragment.java

示例9: onPageSelected

@Override
public void onPageSelected(int position) {
    if (state != ViewPager.SCROLL_STATE_SETTLING) {
        ExposureManager.getInstance().triggerViewCalculate(TrackerInternalConstants.TRIGGER_VIEW_CHANGED, mRootLayout, mCommonInfo, mRootLayout.getLastVisibleViewMap());
    }
}
 
开发者ID:alibaba,项目名称:android_viewtracker,代码行数:6,代码来源:ReuseLayoutHook.java


注:本文中的android.support.v4.view.ViewPager.SCROLL_STATE_SETTLING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。