A resource was not found that matches the specified name: attr 'android: tabLayout'

I would like to customize the tab widget, replacing the style with my own style. The item I'm going to replace is as follows:

 <item name="android:tabLayout">@android:layout/tab_indicator_holo</item>

But I got this error: A resource was not found that matches the specified name: attr 'android: tabLayout'

I set the parent style as follows:

<style name="customTabWidget" parent="@android:style/Widget.Holo.TabWidget">

Project goal: Android 4.0

I also cleaned up the project, but the error still comes up. How to fix the error?

Thanks in advance.

+5
source share
1 answer

. , tabLayout res/values ​​/attrs.xml. TabWidget, android-16 ( tabLayout ):

<declare-styleable name="TabWidget">
    <!-- Drawable used to draw the divider between tabs. -->
    <attr name="divider" />
    <!-- Determines whether the strip under the tab indicators is drawn or not. -->
    <attr name="tabStripEnabled" format="boolean" />
    <!-- Drawable used to draw the left part of the strip underneath the tabs. -->
    <attr name="tabStripLeft" format="reference" />
    <!-- Drawable used to draw the right part of the strip underneath the tabs. -->
    <attr name="tabStripRight" format="reference" />
    <!-- Layout used to organize each tab content. -->
    <attr name="tabLayout" format="reference" />
</declare-styleable>

, :

 <item name="android:tabLayout">...

 <item name="tabLayout">...
+2

All Articles