Skip to content

Commit b424da4

Browse files
committed
Update README.md
1 parent c33841c commit b424da4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ private void onEventMainThread(User aUser) {
3030
## 使用AndroidEventBus
3131
你可以按照下面几个步骤来使用AndroidEventBus.
3232

33-
1. 注册事件接收对象
33+
* 1. 注册事件接收对象
34+
3435
```java
3536

3637
public class YourActivity extends Activity {
@@ -53,7 +54,8 @@ public class YourActivity extends Activity {
5354

5455
```
5556

56-
3. 通过Subscriber注解来标识事件接收对象中的接收方法
57+
* 2. 通过Subscriber注解来标识事件接收对象中的接收方法
58+
5759
```java
5860
public class YourActivity extends Activity {
5961
// code ......
@@ -87,7 +89,8 @@ public class YourActivity extends Activity {
8789

8890
接收函数使用tag来标识可接收的事件类型,与BroadcastReceiver中指定action是一样的,这样可以精准的投递消息。mode可以指定目标函数执行在哪个线程,默认会执行在UI线程,方便用户更新UI。目标方法执行耗时操作时,可以设置mode为ASYNC,使之执行在子线程中。
8991

90-
4. 在其他组件,例如Activity, Fragment,Service中发布事件
92+
* 3. 在其他组件,例如Activity, Fragment,Service中发布事件
93+
9194
```java
9295
EventBus.getDefault().post("what's the time now ?");
9396

0 commit comments

Comments
 (0)