YunRefreshHeader.java 文件源码

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

项目:GitHub 作者:
private void initView() {
    LayoutInflater.from(mContext).inflate(R.layout.kaws_refresh_header, this);
    ImageView img = (ImageView) findViewById(R.id.img);

    animationDrawable = (AnimationDrawable) img.getDrawable();
    if (animationDrawable.isRunning()) {
        animationDrawable.stop();
    }
    msg = (TextView) findViewById(R.id.msg);
    measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    mMeasuredHeight = getMeasuredHeight();
    setGravity(Gravity.CENTER_HORIZONTAL);
    mContainer = (LinearLayout) findViewById(R.id.container);
    mContainer.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, 0));
    this.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号