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


Java Mode.PULL_FROM_START属性代码示例

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


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

示例1: FlipLoadingLayout

public FlipLoadingLayout(Context context, final Mode mode, final Orientation scrollDirection, TypedArray attrs) {
	super(context, mode, scrollDirection, attrs);

	final int rotateAngle = mode == Mode.PULL_FROM_START ? -180 : 180;

	mRotateAnimation = new RotateAnimation(0, rotateAngle, Animation.RELATIVE_TO_SELF, 0.5f,
			Animation.RELATIVE_TO_SELF, 0.5f);
	mRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
	mRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
	mRotateAnimation.setFillAfter(true);

	mResetRotateAnimation = new RotateAnimation(rotateAngle, 0, Animation.RELATIVE_TO_SELF, 0.5f,
			Animation.RELATIVE_TO_SELF, 0.5f);
	mResetRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
	mResetRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
	mResetRotateAnimation.setFillAfter(true);
}
 
开发者ID:ultrasonic,项目名称:ultrasonic,代码行数:17,代码来源:FlipLoadingLayout.java

示例2: FlipLoadingLayoutFooter

public FlipLoadingLayoutFooter(Context context, final Mode mode, final Orientation scrollDirection, TypedArray attrs)
{
    super(context, mode, scrollDirection, attrs, true);

    final int rotateAngle = mode == Mode.PULL_FROM_START ? -180 : 180;

    mRotateAnimation = new RotateAnimation(0, rotateAngle, Animation.RELATIVE_TO_SELF, 0.5f,
            Animation.RELATIVE_TO_SELF, 0.5f);
    mRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
    mRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
    mRotateAnimation.setFillAfter(true);

    mResetRotateAnimation = new RotateAnimation(rotateAngle, 0, Animation.RELATIVE_TO_SELF, 0.5f,
            Animation.RELATIVE_TO_SELF, 0.5f);
    mResetRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
    mResetRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
    mResetRotateAnimation.setFillAfter(true);
}
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:18,代码来源:FlipLoadingLayoutFooter.java

示例3: FlipLoadingLayout

public FlipLoadingLayout(Context context, final Mode mode, final Orientation scrollDirection, TypedArray attrs)
{
    super(context, mode, scrollDirection, attrs);

    final int rotateAngle = mode == Mode.PULL_FROM_START ? -180 : 180;

    mRotateAnimation = new RotateAnimation(0, rotateAngle, Animation.RELATIVE_TO_SELF, 0.5f,
            Animation.RELATIVE_TO_SELF, 0.5f);
    mRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
    mRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
    mRotateAnimation.setFillAfter(true);

    mResetRotateAnimation = new RotateAnimation(rotateAngle, 0, Animation.RELATIVE_TO_SELF, 0.5f,
            Animation.RELATIVE_TO_SELF, 0.5f);
    mResetRotateAnimation.setInterpolator(ANIMATION_INTERPOLATOR);
    mResetRotateAnimation.setDuration(FLIP_ANIMATION_DURATION);
    mResetRotateAnimation.setFillAfter(true);
}
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:18,代码来源:FlipLoadingLayout.java

示例4: setSubHeaderText

private void setSubHeaderText(CharSequence label) {
    if (null != mSubHeaderText) {
        if (TextUtils.isEmpty(label)) {
            mSubHeaderText.setVisibility(View.GONE);
        }
        else {
            // 隐藏footer的时间
            if (mMode == Mode.PULL_FROM_START) {
                mSubHeaderText.setText(label);
            }
            // Only set it to Visible if we're GONE, otherwise VISIBLE will
            // be set soon
            if (View.GONE == mSubHeaderText.getVisibility()) {
                mSubHeaderText.setVisibility(View.VISIBLE);
            }
        }
    }
}
 
开发者ID:harichen,项目名称:PullToRefreshLibrary,代码行数:18,代码来源:LoadingLayout.java


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