I am using TabPageIndicator
with ViewPager
, referred from here. My layout XML is as follow:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.viewpagerindicator.TabPageIndicator
android:id="@+id/indicator"
android:layout_height="35dp"
android:layout_gravity="center_vertical"
android:layout_width="fill_parent"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:layout_margin="0dp"
android:background="#69cbd8"
/>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
And in Manifest
, the activity is defined as follow :
<activity
android:name=".modules.results.ResultsLauncher"
android:configChanges="orientation|screenSize"
android:theme="@style/StyledIndicators">
>
<!-- android:label="Titles/With Listener" -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="com.jakewharton.android.viewpagerindicator.sample.SAMPLE" />
</intent-filter>
</activity>
As you can see, I had used custom style, StyledIndicators
. I had referred
samples downloaded from GITHUB & referred a custom style from here.
Now everything works fine. But the bottom of title of Tab is being covered. And leaving unnecessary space above. I am not able to display whole title of tab. I had attached screen shot of my screen.
I want the title "By Date" & " By Test" to be placed little bit in upper part. But couldn't find the solution.
in order to fully control your
tabPageIndicator
:create XML file and inflate that xml in
tabPageIndicator
componentand from the code inflate that layout