Skip to content

Commit b2386a9

Browse files
Update README.md
1 parent eefd643 commit b2386a9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ allprojects {
2424
We have Two classes FetchData and PutData. Import the Library to your file first (In android studio paste the code and press alt + enter).
2525
### Read Data From a URL - FetchData.class
2626
```
27+
//Start ProgressBar first (Set visibility VISIBLE)
2728
Handler handler = new Handler();
2829
handler.post(new Runnable() {
2930
@Override
@@ -32,6 +33,7 @@ handler.post(new Runnable() {
3233
if (fetchData.startFetch()) {
3334
if (fetchData.onComplete()) {
3435
String result = fetchData.getResult();
36+
//End ProgressBar (Set visibility to GONE)
3537
Log.i("FetchData", result);
3638
}
3739
}
@@ -41,6 +43,7 @@ handler.post(new Runnable() {
4143

4244
### Write data with POST and GET methods - PutData.class
4345
```
46+
//Start ProgressBar first (Set visibility VISIBLE)
4447
Handler handler = new Handler();
4548
handler.post(new Runnable() {
4649
@Override
@@ -58,8 +61,7 @@ handler.post(new Runnable() {
5861
if (putData.startFetch()) {
5962
if (putData.onComplete()) {
6063
String result = putData.getResult();
61-
progressBar.setVisibility(View.GONE);
62-
textView.setText(result);
64+
//End ProgressBar (Set visibility to GONE)
6365
Log.i("PutData", result);
6466
}
6567
}

0 commit comments

Comments
 (0)