Hey TMH geekers, One of the privileges Android provides is the possibility to create customizations on various components of the mobile application. One of them is known as Screen Slide the transition between UI screens.
Here comes a new Android library for those who are tired of old boring image sliding in mobile apps. Bitutorial is a simple way to add a unique Android crumbling image SlideView transition between slides. Whether your application supports a sliding tutorial or image change feature, you certainly want to create a memorable experience.
You can also see : Tinder like SwipeView in Android
Implement the Android Crumbling Image SlideView library
dependencies { compile 'com.cleveroad:splittransformation:0.9.0' }
Then you have to wrap your pager adapter with TransformationAdapterWrapper:
TransformationAdapterWrapper wrapper = TransformationAdapterWrapper .wrap(getContext(), adapter) // rows x column = total number of pieces. Larger number of pieces impacts on performance. .rows(...) .columns(...) // Maximum size of spacing between pieces. .piecesSpacing(...) // Translation for splited pieces. .translationX(...) .translationY(...) // Add top margin for view. Preffer this method instead of setting margin to your view // because transformer will split empty space into pieces too. .marginTop(...) // scale factor for generated bitmaps. Use this if you are facing any OOM issues. .bitmapScale(...) // If you're using complex views with dynamicaly changed content (like edit texts, lists, etc) // you should provide your own complex view detector that will return true for such complex views. // Every time user swipes pager, transformer will regenerate and split bitmap for view (at the start of swipe gesture) // so make sure detector returns true only if view is a complex one. .complexViewDetector(...) // You can set your own factory that produces bitmap transformers. Default implementation: splitting view into pieces .bitmapTransformerFactory(...) .build();
Download Library
Customize Android Crumbling Image SlideView
What exactly can you customize?
.rows(…)
.translationX(…)
As a result…
The Bittutorial component is friendly to any kind of apps and you are free to use it howsoever. But we can pitch you some ideas of use cases.
- Sliding to tutorials or slideshows
- Simple pagination inside your app for all the screens or some of them
- Scrolling through the images (in-app gallery for ecommerce applications or albums for social ones)
- Profile cards in social network apps
Share your thoughts