Skip to content

Commit

Permalink
Release v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhuvaneshw committed Aug 29, 2023
1 parent b5e33d1 commit b6a18af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies {
### Example
```
Task.with(task -> { //or new Task<>(task -> {
Task.Foreground.run(() -> Toast.makeText(this, "This is how you can toast with Task", Toast.LENGTH_SHORT).show());
Task.Foreground.start(() -> Toast.makeText(this, "This is how you can toast with Task", Toast.LENGTH_SHORT).show());
task.sleep(1000);
return null;
}).start();
Expand All @@ -47,7 +47,7 @@ Optional methods
### Complete Example
```
new Task<>(task -> {//Outer Task
Task.Foreground.run(() -> Toast.makeText(this, "This is how you can toast with Task", Toast.LENGTH_SHORT).show());
Task.Foreground.start(() -> Toast.makeText(this, "This is how you can toast with Task", Toast.LENGTH_SHORT).show());
task.sleep(1000);
task.publishProgress(25);
Expand Down Expand Up @@ -84,7 +84,7 @@ Copy [these files](https://github.com/Bhuvaneshw/Task/tree/main/task/src/main/ja
new Task<>(new TaskRunnable<String>() { //Outer Task
@Override
public String run(Task<String> t) throws Exception {
Task.Foreground.run(new Runnable() {
Task.Foreground.start(new Runnable() {
@Override
public void run() {
Toast.makeText(MainActivity.this, "This is how you can toast with Task", Toast.LENGTH_SHORT).show(); // Toast in UI Thread
Expand Down

0 comments on commit b6a18af

Please sign in to comment.