Posts

Showing posts with the label ViewPager

Pager Tabs with Icon and text which appears to have fixed width.

Image
We are going to create pager tabs, which unlike default library will be able to show more than 3 tabs in a screen. All the tabs will close to each other.   To achieve this purpose we shall need a library located at http://viewpagerindicator.com/ . Download the library project, named as JakeWharton-Android-ViewPagerIndicator-2.4.1-0-g8cd549f.zip. It includes a library and sample project. We need library for our app. If you are curious, you may check the sample project as well. Import the library project in eclipse.   Create a new Android project and open its properties. Add library project in this project using Android section in properties. Clean library and android project. Add the following in your activity_layout.xml. <com.viewpagerindicator.TabPageIndicator                 android:id="@+id/indicator"              ...