Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于分包的问题 #18

Closed
MadnessXiong opened this issue Mar 29, 2017 · 1 comment
Closed

关于分包的问题 #18

MadnessXiong opened this issue Mar 29, 2017 · 1 comment

Comments

@MadnessXiong
Copy link

假如把 BaseActivity写在library的话,那么在BaseActivity访问不到app里的东西,比如 App.getInstance().removeActivity(this);这种一些初始化的操作没法在BaseActivity进行。
请问怎么解决这个问题?
我想了一个办法是在app包里再建一个AppBaseActivity继承BaseActivity去实现,但是觉得不太好,请问下还有更好的实现方式吗?

@BaronZ88
Copy link
Owner

BaronZ88 commented Apr 5, 2017

BaseActivity 并不一定就要放到 library 这个 Module 的,你完全可以根据自己的情况灵活处理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants