android / animation-samples Goto Github PK
View Code? Open in Web Editor NEWMultiple samples showing the best practices in animation on Android.
License: Apache License 2.0
Multiple samples showing the best practices in animation on Android.
License: Apache License 2.0
Hi Team,
I have followed this basic sample to implement shared element animation in my app. but Activity A Finishes before animation get completes. I have just tried in ActivitySceneTransitionBasic app. but i am facing same problem. please check attached screenshot. and please let me know how to resolve this issue. I want finish activity once animation completed. Thanks
Issue by iomagics
Tuesday May 15, 2018 at 23:36 GMT
Originally opened as googlearchive/android-transition-examples#5
Fixed the sloppy bugs I made on last pull request.
iomagics included the following code: https://github.com/google/android-transition-examples/pull/5/commits
I'm trying to replace the RecyclerView to ViewPager in the item (GridToPager) example with RecyclerView to ViewPager2 (RecycleView), because I want to use ViewPager2 as my detail list interface (like a full-page vertical page flipping like Tik Tok, because ViewPager cannot support vertical page turning), but I found that this doesn't work and doesn't achieve the same smooth transition effect as the example, what should I do to make it work like the example (my current work is just to replace the ViewPager in the example with ViewPager2, only That's all).
Would be great to update the Compose samples to use the Compose BOM. See android/user-interface-samples#399 for an example of how to do such a migration.
Issue by Amanr790
Thursday Jul 19, 2018 at 12:11 GMT
Originally opened as googlearchive/android-transition-examples#7
Hello i have faced an issue where locking the screen just before shared transition doesnt give me a callback.
Thanks and Regards
Aman
Issue by fundasec3
Saturday Mar 23, 2019 at 18:53 GMT
Originally opened as googlearchive/android-CustomTransition#3
fundasec3 included the following code: https://github.com/googlesamples/android-CustomTransition/pull/3/commits
Issue by mladenrakonjac
Wednesday Oct 12, 2016 at 08:00 GMT
Originally opened as googlearchive/android-ActivitySceneTransitionBasic#9
Is it possible to do such a thing?
Issue by sbakhtiarov
Thursday May 03, 2018 at 07:46 GMT
Originally opened as googlearchive/android-transition-examples#3
Could you please suggest the way to handle image transformation from a square view (with centerCrop applied) in RecyclerView to a full screen (fitCenter) in the image details fragment?
Once I add the cropping the animations are broken. The image is not scaled correctly and size jumps when it is animated back from full screen.
I don't know if this is a bug or not but this is really strange, especially the latter problem which seems somewhat random.
I just added two views above and below the RecyclerView in GridFragment and disabled the fading animation in the GridToPager example and took a video. I think it's clear enough to show the problems.
I import the "Motion" sample as it and My tried with "Navigation --> Shared Element" will crash on emulator v16 with the following trace:
java.lang.UnsupportedOperationException: FragmentContainerView does not support Layout Transitions or animateLayoutChanges="true".
at androidx.fragment.app.FragmentContainerView.setLayoutTransition(FragmentContainerView.java:104)
at androidx.transition.ViewGroupUtilsApi14.suppressLayout(ViewGroupUtilsApi14.java:70)
at androidx.transition.ViewGroupUtils.suppressLayout(ViewGroupUtils.java:62)
It turns out that ViewGroupUtils.suppressLayout
will call viewGroup.setLayoutTransition
for device with SDK < 18:
static void suppressLayout(@NonNull ViewGroup group, boolean suppress) {
if (Build.VERSION.SDK_INT >= 29) {
group.suppressLayout(suppress);
} else if (Build.VERSION.SDK_INT >= 18) {
hiddenSuppressLayout(group, suppress);
} else {
// This will call viewGroup.setLayoutTransition(LayoutTransition) and crash.
ViewGroupUtilsApi14.suppressLayout(group, suppress);
}
}
, and the receiver in this case is the FragmentContainerView
which prohibits this call.
I'm not seeking for a fix as both are current specification, but I wonder if changing the implementation can be trivial to be done?
Issue by zhongjhATC
Monday May 20, 2019 at 09:29 GMT
Originally opened as googlearchive/android-unsplash#12
I'm from China. My English is not very good. I'm very sorry.
The following is from the report :
In com.example.android.unsplash:1.0:1.
Use Leaks records,Keep going in and out of DetailActivity
Steps to observe this issue:
start the app DrawableAnimations -> click AnimatedVectorDrawableCompat -> click START -> back press before the animation is done
crash stacktrace:
java.lang.IllegalStateException: Fragment AnimatedFragment{50ea0d2} (32e3cce7-653f-446c-8e11-15e585368791)} did not return a View from onCreateView() or this was called before onCreateView().
at androidx.fragment.app.Fragment.requireView(Fragment.java:1780)
at com.example.android.drawableanimations.demo.animated.AnimatedFragment$$special$$inlined$viewBindings$1.getValue(ViewBindingDelegates.kt:50)
at com.example.android.drawableanimations.demo.animated.AnimatedFragment$$special$$inlined$viewBindings$1.getValue(ViewBindingDelegates.kt:39)
at com.example.android.drawableanimations.demo.animated.AnimatedFragment.getBinding(Unknown Source:2)
at com.example.android.drawableanimations.demo.animated.AnimatedFragment.access$getBinding$p(AnimatedFragment.kt:29)
at com.example.android.drawableanimations.demo.animated.AnimatedFragment$onViewCreated$1.onAnimationEnd(AnimatedFragment.kt:45)
at androidx.vectordrawable.graphics.drawable.Animatable2Compat$AnimationCallback$1.onAnimationEnd(Animatable2Compat.java:86)
at android.graphics.drawable.AnimatedVectorDrawable$2.onAnimationEnd(AnimatedVectorDrawable.java:1021)
at android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorRT.onAnimationEnd(AnimatedVectorDrawable.java:1771)
at android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorRT.lambda$callOnFinished$0(AnimatedVectorDrawable.java:1778)
at android.graphics.drawable.AnimatedVectorDrawable$VectorDrawableAnimatorRT$$ExternalSyntheticLambda0.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7829)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:982)
in this site we cant proceed to do the label andromo animation samples
to develop the android developers @DanAlbert
I opened the app and its only showing a progress bar of loading screen.
Issue by israelmatavele
Monday Jan 16, 2017 at 14:06 GMT
Originally opened as googlearchive/android-OurStreets#3
Information:Gradle tasks [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources]
D:\AndroidStudioProjects\OurStreets\app\src\main\res\drawable\ic_panorama.xml
Error:Error: For input string: "@fraction/icon_viewport_size"
Error:Execution failed for task ':app:mergeDebugResources'.
D:\AndroidStudioProjects\OurStreets\app\src\main\res\drawable\ic_panorama.xml: Error: For input string: "@fraction/icon_viewport_size"
Issue by iAmMONK
Tuesday Jun 05, 2018 at 09:37 GMT
Originally opened as googlearchive/android-transition-examples#6
Issue by metc
Wednesday Jan 27, 2016 at 20:13 GMT
Originally opened as googlearchive/android-Interpolator#5
Screenshots are now displayed correctly in the README file. This PR fixes the issue #4.
metc included the following code: https://github.com/googlesamples/android-Interpolator/pull/5/commits
Could you provide demonstration gifs because there are many sample codes. It will be very convenient if we can take a look before deep dive.
GridToPager/settings.gradle
after
private val binding by viewBindings(HomeFragmentBinding::bind)
Originally posted by @yantiang13 in #47 (comment)
Issue by natario1
Saturday Apr 07, 2018 at 16:51 GMT
Originally opened as googlearchive/android-transition-examples#2
Referring to this:
I think you should check for position to before calling startPostponedEnterTransition
, right?
You are assuming that the first ImageFragment
image to be loaded is the requested one, but that's not so obvious e.g. with network pictures. Correct me if I'm wrong.
after
private val binding by viewBindings(HomeFragmentBinding::bind)
Issue by yallam08
Saturday Dec 08, 2018 at 01:41 GMT
Originally opened as googlearchive/android-transition-examples#8
The android:duration
attribute in image_shared_element_transition.xml file causes a NPE
But when it's removed and the duration is set programmatically, it works fine:
Transition transition = TransitionInflater.from(getContext()).inflateTransition(R.transition.image_shared_element_transition); transition.setDuration(375);
When I use circularImageView in the first activity. When the back transition happens, there is a slight glitch when the image becomes square to circular. How do I solve this issue?
Issue by rcd27
Monday Dec 24, 2018 at 12:03 GMT
Originally opened as googlearchive/android-CustomTransition#2
https://github.com/googlesamples/android-CustomTransition/blob/master/build.gradle
Issue by metc
Tuesday Jan 26, 2016 at 20:23 GMT
Originally opened as googlearchive/android-Interpolator#4
Hi,
Since commit a001031c33499dcd1e883560a25b99c881442fa8, the two application screenshots are not displayed correctly in the README file.
I tried GridToPager sample, it works as expected.
On the other hand when the GridFragment is itself the child of a viewPager the transition no longer works.
I have made a complete description of the problem here with the modified sample:
here
An idea would be welcome.
Issue by sphairo
Friday Mar 13, 2015 at 22:10 GMT
Originally opened as googlearchive/android-Interpolator#3
Error:(38, 13) Attribute instrumentation#android.test.InstrumentationTestRunner@targetPackage value=(com.example.android.interpolatorplayground) from AndroidManifest.xml:38:13
Cannot resolve symbol android:targetPackage="com.example.android.interpolatorplayground"
License for package Android SDK Platform 28 not accepted.
License for package Android SDK Build-Tools 28.0.3 not accepted.
I am using android studio 4.1.2 and is installed on two computers.
On one old computer a DELL XPS with intel I7 and Windows 10 i have no problems.
With my new computer HP pavilion with AMD Ryzen 7and Windows 10 i have the following problem:
When I start a new project SDK works fine. and the sdk licenses are ok.
When I load a sample with: file>new>Import Sample from GitHub and for instance load Network Connect I get the above warnings and the build fails. Under Tools all menu items below Kotlin are also missing in this case. What can be wrong? And how can I solve this problem?
Regards Joop van der Stel
Can we get an example that shows shared container transition?
Issue by Saraislet
Friday Nov 25, 2016 at 02:45 GMT
Originally opened as googlearchive/android-Interpolator#6
Saraislet included the following code: https://github.com/googlesamples/android-Interpolator/pull/6/commits
Issue by EbrahimKaram
Saturday Apr 13, 2019 at 20:35 GMT
Originally opened as googlearchive/android-ActivitySceneTransitionBasic#12
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: Application
Not working back transition in GridFragment put on ViewPager, so how to set GridFragment on viewpager
I build Gallery app so
I make one viewpager with contains two fragment
First is PhotosFragment and Second is VideosFragment
and above two fragment are GridFragment for our flow
so not working back transition in this flow, so help me how to solve this issue
Shared element transition does not work when the activity goes in background and when you again bring it back from recents.
Issue by krishna-ksharma
Thursday Aug 09, 2018 at 17:25 GMT
Originally opened as googlearchive/android-ActivitySceneTransitionBasic#10
Have mentioned steps to reproduce view visibility issue. Kindly take a look at it.
It's a blocker for us.
krishna-ksharma included the following code: https://github.com/googlesamples/android-ActivitySceneTransitionBasic/pull/10/commits
Is there anyway to set the progress of transition? I want to make the two activity of my app can be switched with gesture just like viewgroup. Is there any methods in class Transition or any lib could do it? Thanks very much.
Issue by sphairo
Friday Mar 13, 2015 at 22:09 GMT
Originally opened as googlearchive/android-Interpolator#2
Error:(38, 13) Attribute instrumentation#android.test.InstrumentationTestRunner@targetPackage value=(com.example.android.interpolatorplayground) from AndroidManifest.xml:38:13
The transition is not working as in example, only do the fade animation. Any idea?
https://i.stack.imgur.com/xpXw8.gif
Hello,
Thank you so much for making this really helpful example. I found an edge case when swiping to images that are not initially visible in the RecyclerView
of the source activity:
I thought that perhaps it's because the ViewHolder
in the not working example wasn't visible hence the transition mapping won't work, but why does it work when we tap on the first row of images? In any case, how can we fix this issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.