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


Java CircleProgressBar.setColorSchemeResources方法代码示例

本文整理汇总了Java中com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar.setColorSchemeResources方法的典型用法代码示例。如果您正苦于以下问题:Java CircleProgressBar.setColorSchemeResources方法的具体用法?Java CircleProgressBar.setColorSchemeResources怎么用?Java CircleProgressBar.setColorSchemeResources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar的用法示例。


在下文中一共展示了CircleProgressBar.setColorSchemeResources方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入方法依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        progress1 = (CircleProgressBar) findViewById(R.id.progress1);
        progress2 = (CircleProgressBar) findViewById(R.id.progress2);
        progressWithArrow = (CircleProgressBar) findViewById(R.id.progressWithArrow);
        progressWithoutBg = (CircleProgressBar) findViewById(R.id.progressWithoutBg);


//        progress1.setColorSchemeResources(android.R.color.holo_blue_bright);
        progress2.setColorSchemeResources(android.R.color.holo_green_light,android.R.color.holo_orange_light,android.R.color.holo_red_light);

        progressWithArrow.setColorSchemeResources(android.R.color.holo_orange_light);
        progressWithoutBg.setColorSchemeResources(android.R.color.holo_red_light);

        handler = new Handler();
        for (int i = 0; i < 10; i++) {
            final int finalI = i;
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    if(finalI *10>=90){
                        progress1.setVisibility(View.VISIBLE);
                        progress2.setVisibility(View.INVISIBLE);
                    }else {
                        progress2.setProgress(finalI * 10);
                    }
                }
            },1000*(i+1));
        }

    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:34,代码来源:MainActivity.java

示例2: onCreate

import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入方法依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        progress1 = (CircleProgressBar) findViewById(R.id.progress1);
        progress2 = (CircleProgressBar) findViewById(R.id.progress2);
        progressWithArrow = (CircleProgressBar) findViewById(R.id.progressWithArrow);
        progressWithoutBg = (CircleProgressBar) findViewById(R.id.progressWithoutBg);


//        progress1.setColorSchemeResources(android.R.color.holo_blue_bright);
        progress2.setColorSchemeResources(android.R.color.holo_green_light);

        progressWithArrow.setColorSchemeResources(android.R.color.holo_orange_light);
        progressWithoutBg.setColorSchemeResources(android.R.color.holo_red_light);

        handler = new Handler();
        for (int i = 0; i < 10; i++) {
            final int finalI = i;
            handler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    if(finalI *10>=90){
                        progress2.setVisibility(View.INVISIBLE);
                    }else {
                        progress2.setProgress(finalI * 10);
                    }
                }
            },1000*(i+1));
        }

    }
 
开发者ID:YCANDORID,项目名称:andoridDome,代码行数:33,代码来源:MainActivity.java

示例3: onCreateView

import com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Set fragment layout
    View rootView = inflater.inflate(R.layout.fragment_recipes, container, false);

    if (savedInstanceState != null) {
        mCurrentKey = savedInstanceState.getString(Utils.ARG_KEY);
        mActivePage = savedInstanceState.getString(Utils.ARG_PAGE);
    }


    // Connect view objects and view id on xml.
    mList = (RecyclerView) rootView.findViewById(R.id.recycler_view);
    mPrgLoading = (CircleProgressBar) rootView.findViewById(R.id.prgLoading);
    mTxtEmpty = (TextView) rootView.findViewById(R.id.txtEmpty);
    //mAdView = (AdView) rootView.findViewById(R.id.adView);

    //mIsAdmobVisible = Utils.admobVisibility(mAdView, Utils.IS_ADMOB_VISIBLE);

    mPrgLoading.setColorSchemeResources(R.color.accent_color);
    mList.setHasFixedSize(true);
    RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(getActivity());
    mList.setLayoutManager(layoutManager);

    // Load ad in background using asynctask class
    //new SyncShowAd(mAdView).execute();

    // Create object of database helpers.
    mDBhelperRecipes = new DbHelperRecipes(getActivity());
    mDBhelperFavorites = new DbHelperFavorites(getActivity());

    // Create database of recipes.
    try {
        mDBhelperRecipes.createDataBase();
        mDBhelperFavorites.createDataBase();
    }catch(IOException ioe){
        throw new Error("Unable to create database");
    }

    openDatabase();

    mAdapterRecipes = new RecipesAdapter(getActivity());

    // When item on list selected, send recipe id and to onRecipeSelected method
    mAdapterRecipes.setOnTapListener(new OnTapListener() {
        @Override
        public void onTapView(String ID, String CategoryName) {
            mCallback.onRecipeSelected(ID, "");
        }
    });

    return rootView;
}
 
开发者ID:jyjeanne,项目名称:Studyandcook,代码行数:55,代码来源:RecipesFragment.java


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