I’m building a new application to the Android platform and I want to implement moving between different activities by scrolling. I want also to use some kind of scrolling effect like in this example.
I’ve searched the web and found a couple of examples using view pager and fragments, but my problems are:
- View pager is used to switch between views and I want to switch between different activities.
- I don’t want to use fragments because I don’t think it’s going to fit to earlier API (before Android 2.1).
So, for my questions:
- Is there any other way for doing it, except of using onFling gesture and then losing the sliding effect?
- Can I use fragments to the earlier API’s?
Thanks.
Of course it is possible to use fragments in lower versions. You simply have use the android support library and impost viewpager to your app. Here is a very good example which uses View Pager and fortunately it implements the support libraries and it worked for me from android 2.1.
http://viewpagerindicator.com/