private void initView(Context context) {
preferences = PreferenceManager.getDefaultSharedPreferences(context);
// 初始情况,设置下拉刷新view高度为0
LayoutParams lp = new LayoutParams(
LayoutParams.FILL_PARENT, 0);
mContainer = (LinearLayout) LayoutInflater.from(context).inflate(
R.layout.lfrecyclerview_header, null);
addView(mContainer, lp);
setGravity(Gravity.BOTTOM);
mArrowImageView = findViewById(R.id.lfrecyclerview_header_arrow);
mHintTextView = findViewById(R.id.lfrecyclerview_header_hint_textview);
mProgressBar = findViewById(R.id.lfrecyclerview_header_progressbar);
lfrecyclerview_header_time= findViewById(R.id.lfrecyclerview_header_time);
mRotateUpAnim = new RotateAnimation(0.0f, -180.0f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
0.5f);
mRotateUpAnim.setDuration(ROTATE_ANIM_DURATION);
mRotateUpAnim.setFillAfter(true);
mRotateDownAnim = new RotateAnimation(-180.0f, 0.0f,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,
0.5f);
mRotateDownAnim.setDuration(ROTATE_ANIM_DURATION);
mRotateDownAnim.setFillAfter(true);
}
RecyclerViewHeader.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:xrecyclerview
作者:
评论列表
文章目录