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

Add androidx support #317

Closed
Jeff11 opened this issue Jul 3, 2018 · 1 comment
Closed

Add androidx support #317

Jeff11 opened this issue Jul 3, 2018 · 1 comment

Comments

@Jeff11
Copy link

Jeff11 commented Jul 3, 2018

We get Unresolved reference because android.support.v7.app.AppCompatActivity is not recognized when using androidx.

@sockeqwe
Copy link
Owner

sockeqwe commented Jul 3, 2018

Unfortunately we are in a bad situation with all this androidx package renaming.
I can't update Mosby to androidx without breaking other apps.

However, what you can do is write your own class BaseActvitiy extends androidx.appcompat.app.AppCompatActivity and then just use the Mosby internal deleage.

Basically you just have to copy & paste the Mosby internal classes
https://github.com/sockeqwe/mosby/blob/master/mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/MvpActivity.java

which actually then just delegates / forwards lifecycle events to the corresponding delegate.

@sockeqwe sockeqwe closed this as completed Jul 3, 2018
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