hehonghui / hehonghui/AndroidEventBus
fragment中使用订阅方法的问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 390
- PR merge metrics
- No merged PRs in 30d
Description
如果我有一个fragment中添加一个订阅方法,fragment里面有个请求去拿数据,成功之后使用eventBus将数据post出来
现在我有一个activity,activity里面通过viewpager添加了刚才fragment的3个实例,
这个时候就会每一个fragment都能接收到3次post回来的数据,这样会有问题
所以请问eventbus针对这种fragment重用切当前页面有同一个class的多个实例的情况,post出来怎么区分呢
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the event subscription and posting API in the context of the Activity's ViewPager and its three Fragment instances. Determine whether events can be scoped to a specific Fragment instance; done means the repeated delivery behavior and a supported way to distinguish recipients are documented or addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100