use of com.github.ybq.android.spinkit.style.ChasingDots in project Android-SpinKit by ybq.
the class Page2Fragment method onViewCreated.
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// ProgressBar
ProgressBar progressBar = (ProgressBar) view.findViewById(R.id.progress);
DoubleBounce doubleBounce = new DoubleBounce();
doubleBounce.setBounds(0, 0, 100, 100);
doubleBounce.setColor(colors[7]);
progressBar.setIndeterminateDrawable(doubleBounce);
// Button
Button button = (Button) view.findViewById(R.id.button);
mWaveDrawable = new Wave();
mWaveDrawable.setBounds(0, 0, 100, 100);
// noinspection deprecation
mWaveDrawable.setColor(getResources().getColor(R.color.colorAccent));
button.setCompoundDrawables(mWaveDrawable, null, null, null);
// TextView
TextView textView = (TextView) view.findViewById(R.id.text);
mCircleDrawable = new Circle();
mCircleDrawable.setBounds(0, 0, 100, 100);
mCircleDrawable.setColor(Color.WHITE);
textView.setCompoundDrawables(null, null, mCircleDrawable, null);
textView.setBackgroundColor(colors[2]);
// ImageView
ImageView imageView = (ImageView) view.findViewById(R.id.image);
mChasingDotsDrawable = new ChasingDots();
mChasingDotsDrawable.setColor(Color.WHITE);
imageView.setImageDrawable(mChasingDotsDrawable);
imageView.setBackgroundColor(colors[0]);
}
Aggregations