Skip to content

Commit

Permalink
update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzue committed May 4, 2022
1 parent 993654a commit 842d9fb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Runner.init(this);

然后就可以愉快的丢东西了!

#### 丢事件:
### 丢事件:

在已经实例化的 Activity 上执行操作:
```java
Expand Down Expand Up @@ -68,7 +68,17 @@ Runner.runOnActivity("Activity2", new ActivityRunnable() {
});
```

#### 丢内容:
额外说明,ActivityRunnable 具有泛型,你可以直接指定泛型为你的目标 Activity,这样就可以直接操作其内部的 public 修饰的成员或方法了:
```java
Runner.runOnActivity("Activity2", new ActivityRunnable<Activity2>() {
@Override
public void run(Activity2 activity2) {
activity2.execPublicFunction();
}
});
```

### 丢内容:

首先,你需要在目标 Activity 上编写一个成员,例如:
```java
Expand Down

0 comments on commit 842d9fb

Please sign in to comment.