Source code of article http://www.androidhive.info/2013/10/android-tab-layout-with-swipeable-views-1/