Пример #1
0
 @Override
 public void hideLoadingAndFinish() {
   mProgressLayout.hide();
   mOkView.setVisibility(View.VISIBLE);
   mOkView.startAnimation(AnimationUtils.loadAnimation(this, R.anim.anim_scale_small_2_big));
   new Handler()
       .postDelayed(
           new Runnable() {
             @Override
             public void run() {
               finish();
             }
           },
           600);
 }
 @Override
 public boolean onOptionsItemSelected(android.view.MenuItem item) {
   switch (item.getItemId()) {
     case android.R.id.home:
       mProgressLayout.show();
       NoteApplication.getInstance()
           .getExecutorPool()
           .execute(
               new Runnable() {
                 @Override
                 public void run() {
                   renameCategories();
                   deleteCategories();
                   CategoryDBModel.getInstance().updateOrder(mCategoryList);
                   mHandler.sendEmptyMessage(1);
                 }
               });
       break;
   }
   return true;
 }
 @Override
 public boolean handleMessage(Message msg) {
   finish();
   mProgressLayout.hide();
   return true;
 }
Пример #4
0
 private void initProgressBar() {
   mProgressLayout.getCircleProgressBar().setCircleBackgroundEnabled(false);
   mProgressLayout.getCircleProgressBar().setColorSchemeColors(Color.WHITE);
 }
Пример #5
0
 @Override
 public void showLoading() {
   mProgressLayout.show();
 }