<commit_before>SimpleViewPagerIndicator
========================
SimpleViewPagerIndicator is a small, easy to use class that you can add to your Android projects to graphically display the number of elements in a ViewPager, as well as allow users to quickly switch pages by touching the page indicators.

![SimpleViewPagerIndicator screenshot](http://i.imgur.com/QALrG.png)

After checking out some existing libraries for doing similar things, I found that many were overly complicated for what I was trying to accomplish. SimpleViewPagerIndicator is designed to allow developers to specify a simple (hence the name), customisable container in an XML layout file, and add elements (in the case of the screenshot, light bulbs) on the fly. The elements have two states - normal, and highlighted. Changing pages simply changes the image state.

Included in this repository is the SimpleViewPagerIndicator class itself, as well a a sample indicator layout file and a few small images. 

Installation
------------
+ Add the SimpleViewPagerIndicator class, view\_pager\_indicator.xml layout file and sample images to your project.
+ Import your project's R file in SimpleViewPagerIndicator.
+ In your activity that contains a ViewPager, just add:

		SimpleViewPagerIndicator pageIndicator = new SimpleViewPagerIndicator(this);
		pageIndicator.setViewPager(pager);
		
+ Any time the view pager's data is changed, be sure to call

		pageIndicator.notifyDataSetChanged();
		
+ Change the layout file and images to your heart's content. <commit_msg>Elaborated installation instructions.<commit_after>SimpleViewPagerIndicator
========================
SimpleViewPagerIndicator is a small, easy to use class that you can add to your Android projects to graphically display the number of elements in a ViewPager, as well as allow users to quickly switch pages by touching the page indicators.

![SimpleViewPagerIndicator screenshot](http://i.imgur.com/QALrG.png)

After checking out some existing libraries for doing similar things, I found that many were overly complicated for what I was trying to accomplish. SimpleViewPagerIndicator is designed to allow developers to specify a simple (hence the name), customisable container in an XML layout file, and add elements (in the case of the screenshot, light bulbs) on the fly. The elements have two states - normal, and highlighted. Changing pages simply changes the image state.

Included in this repository is the SimpleViewPagerIndicator class itself, as well a a sample indicator layout file and a few small images. 

Installation
------------
+ Add the SimpleViewPagerIndicator class, view\_pager\_indicator.xml layout file and sample images to your project.
+ Import your project's R file in SimpleViewPagerIndicator.
+ In your activity's layout file, add: 

		<au.com.papercloud.pager.SimpleViewPagerIndicator
	        android:id="@+id/page_indicator"
	        android:layout_width="match_parent"
	        android:layout_height="wrap_content"
	        android:gravity="center" />
   
+ In your activity that contains a ViewPager, just add:

		SimpleViewPagerIndicator pageIndicator = (SimpleViewPagerIndicator) findViewById(R.id.page_indicator);
		pageIndicator.setViewPager(pager);
		
+ Of course, you may also create the indicator in code and add it to your activity's content view. 
+ Any time the view pager's data is changed, be sure to call

		pageIndicator.notifyDataSetChanged();
		
+ Change the layout file and images to your heart's content. 
{'fraction_non_alphanumeric': 0.06838340486409156, 'fraction_numerical': 0.0, 'mean_word_length': 4.788079470198675, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5572011', 'n_tokens_mistral': 881, 'n_tokens_neox': 853, 'n_words': 423}