HeaderLoadingLayout.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:RefreshWithAppBarLayout 作者:
/**
 * 初始化
 *
 * @param context context
 */
private void init(Context context) {
    mHeaderContainer = (RelativeLayout) findViewById(R.id.pull_to_refresh_header_content);
    mArrowImageView = (ImageView) findViewById(R.id.pull_to_refresh_header_arrow);
    mHintTextView = (TextView) findViewById(R.id.pull_to_refresh_header_hint_textview);
    mProgressBar = (ProgressBar) findViewById(R.id.pull_to_refresh_header_progressbar);
    mHeaderTimeView = (TextView) findViewById(R.id.pull_to_refresh_header_time);
    mHeaderTimeViewTitle = (TextView) findViewById(R.id.pull_to_refresh_last_update_time_text);

    float pivotValue = 0.5f;    // SUPPRESS CHECKSTYLE
    float toDegree = -180f;     // SUPPRESS CHECKSTYLE
    // 初始化旋转动画
    mRotateUpAnim = new RotateAnimation(0.0f, toDegree, Animation.RELATIVE_TO_SELF, pivotValue,
            Animation.RELATIVE_TO_SELF, pivotValue);
    mRotateUpAnim.setDuration(ROTATE_ANIM_DURATION);
    mRotateUpAnim.setFillAfter(true);
    mRotateDownAnim = new RotateAnimation(toDegree, 0.0f, Animation.RELATIVE_TO_SELF, pivotValue,
            Animation.RELATIVE_TO_SELF, pivotValue);
    mRotateDownAnim.setDuration(ROTATE_ANIM_DURATION);
    mRotateDownAnim.setFillAfter(true);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号