astuetz / PagerSlidingTabStrip

An interactive indicator to navigate between the different pages of a ViewPager
139 stars 44 forks source link

Extension (with custom view) doesn't take effect with the xml configuration? #222

Open alexdangmedhelp opened 9 years ago

alexdangmedhelp commented 9 years ago

Hi! I am using com.astuetz.viewpager.extensions.PagerSlidingTabStrip so that I can use the custom view instead of just either icon or text. The issue that I encountered is that none of the specified pagerslidingtabstrip xml properties that I put in takes effect on the UI. Right now it appears as the default UI, but none of customization takes effect. Do I have to do something in addition? Below is my xml. Thanks.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" >

<com.astuetz.viewpager.extensions.PagerSlidingTabStrip
    android:id="@+id/tabs"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    app:pstsShouldExpand="true"
    app:pstsTabPaddingLeftRight="10dp"
    app:pstsUnderlineColor="@color/app_color"
    app:pstsIndicatorColor="@color/app_color"
    app:pstsDividerColor="@color/transparent"/>

<android.support.v4.view.ViewPager
    android:id="@+id/category_slide_viewpager"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="120dp"
    android:layout_marginBottom="10dp"
    android:layout_alignParentTop="true"
    android:background="@android:color/transparent">
</android.support.v4.view.ViewPager>