0

I'm developing a material design app, and I have declared the Explode animation for activity transition & it is available only for android versions 5.0+.

So, my question is that according to best development practices, is it necessary/best to have the same animation in android versions below 5.0 or can I go with some other or no animations?

Please let me know.

Sorry for formatting of question.

Thanks in advance.

  • There is no problem with this behavior. Google obviously wants you to use the new animations that are introduced with each new API, and earlier APIs do not support some of the newer features. What's more important is that you gracefully handle these situations instead of your app just crashing when it can't find a certain feature because it's running on an outdated API. – NoChinDeluxe Oct 13 '15 at 17:22
  • Also note that the Google Support Library handles a lot of these situations for you by "faking" the new features in older APIs by manually creating them behind the scenes. – NoChinDeluxe Oct 13 '15 at 17:24
  • @drschultz yeah, right. Actually, I want to be a **TOP DEVELOPER**, that's why i'm considering all these small facts. –  Oct 13 '15 at 17:24
  • @drschultz so can I add `Explode` transition in android version below 5.0? –  Oct 13 '15 at 17:25
  • For the technical aspect: http://stackoverflow.com/questions/27344357/android-5-activity-transition-on-lower-api – Eugen Pechanec Oct 13 '15 at 18:00

2 Answers2

0

Your question is way too subjective. I depends on what you want or your boss wants you to do. Actually if you really want it, you can make your app look material on 5+ devices and have like 16bit graphics on lower ones(though this will be kinda tricky). Your app won't get deleted from Google Play for this.

If you want to provide users an ultimate experience, then you should probably follow Google guidelines. Though, you have to balance between making your app look exactly the same on all kind of devices and investing sane amounts of time in to development. It's all up to you, really.

Kistamushken
  • 221
  • 3
  • 11
0

Activity and Fragment transitions are only available on Android 5.0 (API 21) and above. So if you want to use these features, you would want to check for the version in your code so you can find out what version of Android the device is using. Then you would perform either an Android 5.0+ material design feature, or fall back on something more basic from an earlier API. You would perform the check like this:

// Check if we're running on Android 5.0 or higher
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    // Call some material design APIs here
} else {
    // Implement this feature without material design
}
NoChinDeluxe
  • 3,446
  • 1
  • 16
  • 29