Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
VishnuSivadasVS authored Jun 24, 2020
1 parent eefd643 commit b2386a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ allprojects {
We have Two classes FetchData and PutData. Import the Library to your file first (In android studio paste the code and press alt + enter).
### Read Data From a URL - FetchData.class
```
//Start ProgressBar first (Set visibility VISIBLE)
Handler handler = new Handler();
handler.post(new Runnable() {
@Override
Expand All @@ -32,6 +33,7 @@ handler.post(new Runnable() {
if (fetchData.startFetch()) {
if (fetchData.onComplete()) {
String result = fetchData.getResult();
//End ProgressBar (Set visibility to GONE)
Log.i("FetchData", result);
}
}
Expand All @@ -41,6 +43,7 @@ handler.post(new Runnable() {

### Write data with POST and GET methods - PutData.class
```
//Start ProgressBar first (Set visibility VISIBLE)
Handler handler = new Handler();
handler.post(new Runnable() {
@Override
Expand All @@ -58,8 +61,7 @@ handler.post(new Runnable() {
if (putData.startFetch()) {
if (putData.onComplete()) {
String result = putData.getResult();
progressBar.setVisibility(View.GONE);
textView.setText(result);
//End ProgressBar (Set visibility to GONE)
Log.i("PutData", result);
}
}
Expand Down

0 comments on commit b2386a9

Please sign in to comment.