use of com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView in project XRecyclerView by jianghejie.
the class ArrowRefreshHeader method setProgressStyle.
public void setProgressStyle(int style) {
if (style == ProgressStyle.SysProgress) {
mProgressBar.setView(new ProgressBar(getContext(), null, android.R.attr.progressBarStyle));
} else {
AVLoadingIndicatorView progressView = new AVLoadingIndicatorView(this.getContext());
progressView.setIndicatorColor(0xffB5B5B5);
progressView.setIndicatorId(style);
mProgressBar.setView(progressView);
}
}
use of com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView in project XRecyclerView by jianghejie.
the class LoadingMoreFooter method setProgressStyle.
public void setProgressStyle(int style) {
if (style == ProgressStyle.SysProgress) {
progressCon.setView(new ProgressBar(getContext(), null, android.R.attr.progressBarStyle));
} else {
AVLoadingIndicatorView progressView = new AVLoadingIndicatorView(this.getContext());
progressView.setIndicatorColor(0xffB5B5B5);
progressView.setIndicatorId(style);
progressCon.setView(progressView);
}
}
use of com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView in project XRecyclerView by jianghejie.
the class ArrowRefreshHeader method initView.
private void initView() {
// 初始情况,设置下拉刷新view高度为0
mContainer = (LinearLayout) LayoutInflater.from(getContext()).inflate(R.layout.listview_header, null);
LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
lp.setMargins(0, 0, 0, 0);
this.setLayoutParams(lp);
this.setPadding(0, 0, 0, 0);
addView(mContainer, new LayoutParams(LayoutParams.MATCH_PARENT, 0));
setGravity(Gravity.BOTTOM);
mArrowImageView = (ImageView) findViewById(R.id.listview_header_arrow);
mStatusTextView = (TextView) findViewById(R.id.refresh_status_textview);
//init the progress view
mProgressBar = (SimpleViewSwitcher) findViewById(R.id.listview_header_progressbar);
AVLoadingIndicatorView progressView = new AVLoadingIndicatorView(getContext());
progressView.setIndicatorColor(0xffB5B5B5);
progressView.setIndicatorId(ProgressStyle.BallSpinFadeLoader);
mProgressBar.setView(progressView);
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);
mHeaderTimeView = (TextView) findViewById(R.id.last_refresh_time);
measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
mMeasuredHeight = getMeasuredHeight();
}
use of com.jcodecraeer.xrecyclerview.progressindicator.AVLoadingIndicatorView in project XRecyclerView by jianghejie.
the class LoadingMoreFooter method initView.
public void initView() {
setGravity(Gravity.CENTER);
setLayoutParams(new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
progressCon = new SimpleViewSwitcher(getContext());
progressCon.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
AVLoadingIndicatorView progressView = new AVLoadingIndicatorView(this.getContext());
progressView.setIndicatorColor(0xffB5B5B5);
progressView.setIndicatorId(ProgressStyle.BallSpinFadeLoader);
progressCon.setView(progressView);
addView(progressCon);
mText = new TextView(getContext());
mText.setText("正在加载...");
loadingHint = (String) getContext().getText(R.string.listview_loading);
noMoreHint = (String) getContext().getText(R.string.nomore_loading);
loadingDoneHint = (String) getContext().getText(R.string.loading_done);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
layoutParams.setMargins((int) getResources().getDimension(R.dimen.textandiconmargin), 0, 0, 0);
mText.setLayoutParams(layoutParams);
addView(mText);
}
Aggregations