Skip to content

Commit

Permalink
Optimize ToastUtils And add SPUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjiakang committed Jan 18, 2019
1 parent 1154f59 commit ff0ed1b
Show file tree
Hide file tree
Showing 18 changed files with 925 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README-EN.md
Expand Up @@ -10,6 +10,7 @@ This library is based on the principle of making development simpler and more ef

- **20190110** Base Avtivity and Fragment And examples
- **20190112** Many tools and optimized BaseDrawerActivity
- **20190118** Optimize ToastUtils And add SPUtils

## Table of Contents

Expand All @@ -29,6 +30,7 @@ This library is based on the principle of making development simpler and more ef
5. BarUtils
6. LogUtils
7. PermissionUtils
8. SPUtils

## get-started

Expand Down
16 changes: 15 additions & 1 deletion README.md
Expand Up @@ -12,6 +12,7 @@

- **20190110** Base Avtivity and Fragment And examples
- **20190112** Many tools and optimized BaseDrawerActivity
- **20190118** Optimize ToastUtils And add SPUtils

## 内容列表

Expand All @@ -31,6 +32,7 @@
5. BarUtils
6. LogUtils
7. PermissionUtils
8. SPUtils

## get-started

Expand All @@ -53,12 +55,24 @@
}
```

## 作者


## 整理者

- Yangjiakang, **[MeandNi](https://meandni.com)**



## 鸣谢

[@布兰柯基](https://github.com/Blankj)

[@Android 轮子哥](https://github.com/getActivity)



本库意义在于我对Android学习的记录,也借鉴了很多其他开发者的代码,感谢那些无私奉献开源者。同时我也希望有一天能为Android片土地贡献自己的一份力!

## License

```
Expand Down
Expand Up @@ -2,6 +2,7 @@

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.annotation.LayoutRes;
import android.support.v7.app.AppCompatActivity;
Expand Down Expand Up @@ -70,4 +71,28 @@ private boolean isFastClick() {
public void onClick(final View view) {
if (!isFastClick()) onWidgetClick(view);
}
}

public ProgressDialog progressDialog;

public ProgressDialog showProgressDialog() {
progressDialog = new ProgressDialog(mActivity);
progressDialog.setMessage("加载中");
progressDialog.show();
return progressDialog;
}

public ProgressDialog showProgressDialog(CharSequence message) {
progressDialog = new ProgressDialog(mActivity);
progressDialog.setMessage(message);
progressDialog.show();
return progressDialog;
}

public void dismissProgressDialog() {
if (progressDialog != null && progressDialog.isShowing()) {
// progressDialog.hide();会导致android.view.WindowLeaked
progressDialog.dismiss();

}
}
}

0 comments on commit ff0ed1b

Please sign in to comment.