Archive

Posts Tagged ‘library’

Build ViewPagerIndicator with Ant

December 26, 2012 Leave a comment

ViewPagerIndicator is one of the great libraries that helps to indicate the page status of when using ViewPager.

If you want to know more about it, visit the developers’ homepage: http://viewpagerindicator.com/

By default, it’s set to build with Maven, not Ant. So in order to build with Ant, you should do the following steps:

1. Download the package and extract it, you can click here to download,

or you can checkout it source code from developers’  branch: https://github.com/JakeWharton/Android-ViewPagerIndicator

Then name the directory, I named it: ~/ViewPagerIndicator

2. Navigate to this directory and start to create the project settings and build.xml for Ant build:

$ cd ViewPagerIndicator

$ android update project -p library/
Updated local.properties
No project name specified, using project folder name 'library'.
If you wish to change it, edit the first line of build.xml.
Added file ~/ViewPagerIndicator/library/build.xml
Added file ~/ViewPagerIndicator/library/proguard-project.txt

3. Build the sample source code and run it!

$ android update project -p sample/
Updated local.properties
No project name specified, using Activity name 'ListSamples'.
If you wish to change it, edit the first line of build.xml.
Added file ~/ViewPagerIndicator/sample/build.xml
Added file ~/ViewPagerIndicator/sample/proguard-project.txt

$ cd sample

$ ant clean

$ ant debug install

Now open your device and run the sample to enjoy the features that the library brings.

@p/s: Thanks Jake Wharton for this cool library and his support.

 

Cheers,
Pete Houston