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

API 21 requirement? #142

Open
NickvanDyke opened this issue May 30, 2019 · 3 comments
Open

API 21 requirement? #142

NickvanDyke opened this issue May 30, 2019 · 3 comments
Labels
type:question A question about Acorn

Comments

@NickvanDyke
Copy link

The library requires a minSdk of 21. How safe is it to ignore that? Are there functions we can avoid once ignoring the minSdk requirement that will make it safe to use still? Thanks.

@nhaarman
Copy link
Owner

Running Lint on the project with minSdk 19 shows that the default SceneTransition implementations use the translationZ property on View, which was added in API 21: https://github.com/nhaarman/acorn/blob/496ad2b521e1f81003b41d613215721c9823ffe0/ext/acorn-android/src/main/java/com/nhaarman/acorn/android/transition/FadeInFromBottomTransition.kt#L50-L49

You could provide a custom SceneTransitionFactory to avoid these classes from being used.

Other than that, I see no other code using the newer APIs.

@nhaarman nhaarman added the type:question A question about Acorn label May 30, 2019
@NickvanDyke
Copy link
Author

Cool, thanks. I figured it'd be something related to transitions.

May I ask what your future plans are for the lib? My team is considering using it in production, but are unsure how long you might stick with it or what you're hoping to do with it in the long term. Thanks for your work.

@nhaarman
Copy link
Owner

Cool! I think I'll stick with the minSdk of 21 though, to avoid possibly restricting development in the future.

We're currently using it in 4 small to mid-sized projects at our company, so you could say we're invested in it. The library itself is considered stable, breaking changes should not occur until 2.0.

As for the long term, I'm personally pretty excited for Kotlin Multiplatform, so this is a logical next step to look into!

As always it is important to know that new libraries always come with a cost, especially libraries that aren’t widely used. It is important to be aware of these costs when incorporating a new library into your application. Things that are unclear, broken or just not supported may be difficult to overcome at first.
Modularization also comes with a cost. One of Acorn’s main pillars is modularization, which means that you may need to write extra code to wire everything together. Where Fragments and the Android Navigation Component make it easy to get things up and running very quickly but entangling and coupling occurs, this library is the exact opposite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question A question about Acorn
Projects
None yet
Development

No branches or pull requests

2 participants