| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
test tests_app_transitions |
Sorry, something went wrong.
| transition = new NoTransition(0, null); | ||
| } else if (name === "default") { | ||
| transition = new DefaultTransition(0, null); | ||
| transition = new FadeTransition(0, null); |
There was a problem hiding this comment.
Does this create a meaningful fade transition? Duration 0 and nativeCurve = null seem to be adequate for NoTransition but for Fade?
Sorry, something went wrong.
There was a problem hiding this comment.
Are we sure Fade is default on all api levels and across all vendors.
If for example Sony have different default value and we force Fade app will not look natural on this device.
Can we at get old behavior for api < 27 and fallback to Fade only on Api27?
Can we also check if api27 expose some public apis to get default transition?
Sorry, something went wrong.
There was a problem hiding this comment.
Can we at get old behavior for api < 27 and fallback to Fade only on Api27?
Android P Beta SDK version returns 27, which is API level for Android 8.1.
Can we also check if api27 expose some public apis to get default transition?
I am afraid there is no public APIs. I have submitted a request in their issue tracker.
Sorry, something went wrong.
There was a problem hiding this comment.
@manoldonev, the same question is valid for the default transition.
I have verified that it executes with duration -1.
Sorry, something went wrong.
|
test tests_app_transitions |
Sorry, something went wrong.
| } | ||
|
|
||
| initDefaultAnimations(manager); | ||
| // NOTE: Android P Beta SDK version returns 27, which is API level for Android 8.1 |
There was a problem hiding this comment.
The next three lines are repeated multiple times. This can be moved to a method called isAndroidP or something like that.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks.
Sorry, something went wrong.
| if (sdkVersion() < 27) { | ||
| transition = new DefaultTransition(0, null); | ||
| } else { | ||
| transition = new FadeTransition(150, null); |
There was a problem hiding this comment.
If 150 is some constant you can move it to a variable.
Sorry, something went wrong.
|
test tests_app_transitions |
Sorry, something went wrong.
Reference: https://developer.android.com/preview/restrictions-non-sdk-interfaces Android P introduces new restrictions on the use of non-SDK interfaces, whether directly, via reflection, or via JNI. These restrictions are applied whenever an app references a non-SDK interface or attempts to obtain its handle using reflection or JNI. In particular, remove reflection via Class.getDeclaredField() and fallback default transition to fade transition.
Create default transition and setup default animations based on SDK version. This is to avoid reflection via Class.getDeclaredMethod() for Android P where it throws.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Reference: https://developer.android.com/preview/restrictions-non-sdk-interfaces
Android P introduces new restrictions on the use of non-SDK interfaces, whether directly, via reflection, or via JNI. These restrictions are applied whenever an app references a non-SDK interface or attempts to obtain its handle using reflection or JNI.
In particular, fallback default transition to fade transition.
What is the current behavior?
We use reflection to obtain a non-SDK interface and initialize default transition.
What is the new behavior?
Fallback default transition to fade transition.
Fixes #5798.