The way to fix this bug :
- step 1 : add android:visibility=”gone”
<com.viewpagerindicator.TabPageIndicator
android:id="@+id/tpi_news_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/StyledIndicators"
android:visibility="gone"/>
- step 2 add setVisibility in initData() method
mIndicator.setVisibility(View.VISIBLE);