ExpandablePager alternatives and similar packages
Based on the "ViewPager Widget" category.
Alternatively, view ExpandablePager alternatives based on common mentions on social networks and blogs.
-
Android-ViewPagerIndicator
Paging indicator widgets compatible with the ViewPager from the Android Support Library and ActionBarSherlock. Originally based on Patrik Åkerfeldt's ViewFlow. -
SCViewPager
A simple keyframe-based animation framework for UIKit. Perfect for scrolling app intros. -
WoWoViewPager
Combine ViewPager and Animations to provide a simple way to create applications' guide pages. -
SpringIndicator
A spring indicator like Morning Routine guide. -
android-auto-scroll-view-pager
Android auto scroll viewpager or viewpager in viewpager -
HollyViewPager
A different beautiful ViewPager, with quick swipe controls -
LoopingViewPager
An android ViewPager extension allowing infinite scrolling -
MultiViewPager
The MultiViewPager is an extension of the support-v4 library's ViewPager that allows the pages to be wider or narrower than the ViewPager itself. It takes care of aligning the pages next to each other, and always keeping the selected page centered. -
InfiniteViewPager
Augment Android's ViewPager with wrap-around functionality. -
FlycoPageIndicator
A Page Indicator Lib is realized in a different way. -
VerticalViewPager
Vertical implementation of Android ViewPager -
parallaxviewpager
[Development stopped in 2014. Unfinished and not stable - not recommended to use.] An easy-to-use ViewPager subclass with parallax background effect for Android apps. -
ViewPager3D
Extension of Android ViewPager with a 3D swipe effect -
ViewPagerExtensions
A set of custom views for the ViewPager from the Android Support Package -
NumericPageIndicator
Android - A ViewPager page indicator that displays the current page number and (optionally) the page count -
glazy-viewpager
Android ViewPager template with cool animation. -
Android-ScreenSlidePager
Pager (especially for ViewPager) indicator in two styles: circle & fraction. -
LastPagerAdapter
Don't write a ViewPager Adapter! Hook up your ViewPager to your data model using Android Data Binding Framework. With Kotlin support! -
Sliding Tab With Color Icons
Library for Sliding Tab With Color Icons!
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of ExpandablePager or a related project?
README
ExpandablePager
Layout that contains a ViewPager and can slide vertically between 2 states (expanded and collapsed).
Requirements
Android 4.0+ (Ice Cream Sandwich and later)
Setup
Step 1
Add the following line to the dependencies
section of your build.gradle
file
compile 'com.telenav.expandablepager:expandablepager:0.2.1'
Step 2
Extend desired adapter:
ExpandablePagerAdapter (don't forget to override
instantiateItem
)public class MyAdapter extends ExpandablePagerAdapter<Book> { ... @Override public Object instantiateItem(ViewGroup container, int position) { final ViewGroup rootView = (ViewGroup) LayoutInflater.from(container.getContext()).inflate(R.layout.page, container, false); //inflate view ... return attach(container, rootView, position); //don't forget to return the result of attach() } }
ExpandableFragmentPagerAdapter
ExpandableFragmentStatePagerAdapter
Step 3
Add ExpandablePager to a layout
<?xml version="1.0" encoding="utf-8"?>
RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.telenav.expandablepager.ExpandablePager
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_alignParentBottom="true" /> //pin the pager to the bootom of the screen using layout_gravity or layout_alignParentBottom
</RelativeLayout>
Step 4
Create and pass your adapter to the ExpandablePager
MyAdapter adapter = new MyAdapter(myData);
ExpandablePager pager = (ExpandablePager) findViewById(R.id.container);
pager.setAdapter(adapter);
Step 5 (optional)
- Set collapsed height & animation duration via xml
xml app:animation_duration="200" app:collapsed_height="@dimen/header_height"
or programmaticallyjava pager.setAnimationDuration(duration); pager.setCollapsedHeight((int) getResources().getDimension(R.dimen.header_height));
Set display mode (MODE_REGULAR or MODE_FIXED)
pager.setMode(ExpandablePager.MODE_REGULAR);
Extras
Change pager state (supported states are STATE_COLLAPSED, STATE_EXPANDED, and STATE_HIDDEN)
pager.setState(ExpandablePager.STATE_COLLAPSED)
Animate pager state change
pager.animateToState(ExpandablePager.STATE_COLLAPSED)
Set current item
pager.setCurrentItem(index, false);
Set listeners
pager.setOnSliderStateChangeListener(new OnSliderStateChangeListener() { @Override public void onStateChanged(View page, int index, int state) { ... } @Override public void onPageChanged(View page, int index, int state) { ... } }); pager.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(List<?> items, int index) { ... } });
Sample
For a more detailed example check the demoapp module.
License
*Note that all licence references and agreements mentioned in the ExpandablePager README section above
are relevant to that project's source code only.