Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 978 Bytes

EASY_VIEW_PAGER.md

File metadata and controls

33 lines (23 loc) · 978 Bytes

EasyViewPager

A wrapper library for the ViewPager widget to simplify instantiation.

Preview

Benefits

Create paged views quickly without the need to specify a Pager Adapter. A generic instance of the adapter is created and managed internally within the EasyViewPager instance. Adding and removing pages are facilitated by simple method calls on this instance, by passing in Views.

Usage

EasyViewPager can be defined in an XML layout file such as:

<net.scarlettsystems.android.widget.EasyViewPager
		android:id="@+id/pager"
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		app:swipeable="false"/>

Pages are programmatically added and automatically shown in the view:

EasyViewPager pager = findViewById(R.id.pager);
View view = new View(this);
pager.addPage(view);