当前位置: 首页>>代码示例>>Java>>正文


Java ChasingDots类代码示例

本文整理汇总了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();
}
 
开发者ID:Right-Men,项目名称:Ironman,代码行数:36,代码来源:RNSpinkitView.java

示例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]);
}
 
开发者ID:ybq,项目名称:Android-SpinKit,代码行数:35,代码来源:Page2Fragment.java


注:本文中的com.github.ybq.android.spinkit.style.ChasingDots类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。