public void onSizeChanged() { linearGradient = null; startLoading(); }
public LoaderTextView(Context context) { super(context); init(null); }
public LoaderImageView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(attrs); }
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); loaderController.onDraw(canvas, getCompoundPaddingLeft(), getCompoundPaddingTop(), getCompoundPaddingRight(), getCompoundPaddingBottom()); }
public void resetLoader(View view) { ((LoaderTextView)findViewById(R.id.txt_name)).resetLoader(); ((LoaderTextView)findViewById(R.id.txt_title)).resetLoader(); ((LoaderTextView)findViewById(R.id.txt_phone)).resetLoader(); ((LoaderTextView)findViewById(R.id.txt_email)).resetLoader(); ((LoaderImageView)findViewById(R.id.image_icon)).resetLoader(); loadData(); }
private void init() { rectPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.FILTER_BITMAP_FLAG); loaderView.setRectColor(rectPaint); setValueAnimator(0.5f, 1, ObjectAnimator.INFINITE); }
public void resetLoader() { if (getDrawable() != null) { super.setImageDrawable(null); loaderController.startLoading(); } }
public void resetLoader() { if (!TextUtils.isEmpty(getText())) { super.setText(null); loaderController.startLoading(); } }
public void setHeightWeight(float heightWeight) { this.heightWeight = validateWeight(heightWeight); }
public LoaderController(LoaderView view) { loaderView = view; init(); }
public void onDraw(Canvas canvas) { onDraw(canvas, 0, 0, 0, 0); }
@Override public boolean valueSet() { return (getDrawable() != null); }
@Override public void onAnimationUpdate(ValueAnimator valueAnimator) { progress = (float) valueAnimator.getAnimatedValue(); loaderView.invalidate(); }
@Override public void setImageIcon(Icon icon) { super.setImageIcon(icon); loaderController.stopLoading(); }
public LoaderTextView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(attrs); }
public LoaderImageView(Context context) { super(context); init(null); }
public void setWidthWeight(float widthWeight) { this.widthWeight = validateWeight(widthWeight); }
public LoaderTextView(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); }
public LoaderImageView(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); }