astuetz / PagerSlidingTabStrip

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

No resource identifier found for attribute 'pstsTabSwitch' in package [package name] #129

Open Psest328 opened 10 years ago

Psest328 commented 10 years ago

I'm trying to use icons in my tabs. I set everything to drawables with selected/not selected states and put "app:pstsTabSwitch" in my xml but I keep getting the same error. Here's my XML:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <com.astuetz.PagerSlidingTabStrip
        android:id="@+id/tabs"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        app:pstsTabSwitch="true" />

    <android.support.v4.view.ViewPager            
        android:id="@+id/viewPager"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</RelativeLayout>
Psest328 commented 10 years ago

I did set the pstsTabSwitch attr in the xml

iAviatorJose commented 9 years ago

Check the styles.xml file of the library project and see if the above attribute is there.

SanthoshDhandapani commented 9 years ago

I faced the same issue and got resolved. Check if the compile 'com.astuetz:pagerslidingtabstrip:1.0.1' is given in your build file. If it is there remove it and give as compile project("your customized library project path") in your build file. Make sure that you have made all the changes in your library project as mentioned by https://github.com/astuetz/PagerSlidingTabStrip/pull/62/files

Example : In my case i have specified as compile project(':external-libs:PagerSlidingTabStripLibrary') in my build file where external-libs is one of a directory in my project.