简体   繁体   中英

Android Slide animation on single fragment after swipe

I have a JSONArray with several keys (size of array is always different). I'm working with this JSON array in one fragment with bind events on swipe left/right. After swipe left are taken values under key [actual_array_posistion - 1] and same for swipe right [actual_array_posistion + 1] . I'm displaying fetched values from JSON array under given key into predefined textviews in fragment layout.

  • Problem is that, there is no slide animation on the fragment.

Any simple and efficient idea, how to solve this problem? I thought that i create fragments dynamically like on this link . But i think that the solution in the link is not applicable in this case.

Thanks for any advice or simple example.

Hello atully i am not totally get what you looking for but if you want load animation from json to native android so Airnub provide Lottie library just use it and may be there was problem in json so i will also upload their tutorial link

Make animation

hear is link by which you can know how to use library in android

lottie library

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM