本文整理汇总了Java中com.github.ybq.android.spinkit.style.ChasingDots类的典型用法代码示例。如果您正苦于以下问题:Java ChasingDots类的具体用法?Java ChasingDots怎么用?Java ChasingDots使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChasingDots类属于com.github.ybq.android.spinkit.style包,在下文中一共展示了ChasingDots类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSprite
import com.github.ybq.android.spinkit.style.ChasingDots; //导入依赖的package包/类
private Sprite getSprite(String spinnerType) {
switch (spinnerType) {
case "Bounce" :
return new DoubleBounce();
case "Wave" :
return new Wave();
case "RotatingPlane" :
return new RotatingPlane();
case "WanderingCubes":
return new WanderingCubes();
case "9CubeGrid":
return new CubeGrid();
case "FadingCircleAlt" :
return new FadingCircle();
case "Pulse" :
return new Pulse();
case "ChasingDots":
// Add scale factor to prevent clipping
Sprite d = new ChasingDots();
d.setScale(0.85f);
return d;
case "ThreeBounce":
return new ThreeBounce();
case "Circle":
return new Circle();
case "FoldingCube":
// Add scale factor to prevent clipping
Sprite sprite = new FoldingCube();
sprite.setScale(0.70f);
return sprite;
default :
break;
}
return new RotatingPlane();
}
示例2: onViewCreated
import com.github.ybq.android.spinkit.style.ChasingDots; //导入依赖的package包/类
@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]);
}