The activity using ViewPagerIndicator needs to have the appropriate styles in its theme.
本文主要是介绍Failed to find style 'vpiCirclePageIndicatorStyle' in current theme,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
使用 ViewPagerIndicator 时 , 布局文件报的错
Missing styles. Is the correct theme chosen for this layout?
Use the Theme combo box above the layout to choose a different layout, or fix the theme style references.
Failed to find style 'vpiCirclePageIndicatorStyle' in current theme
解决方法:
在style.xml 文件中 加入 以下行,即让 AppTheme 包含 vpiCirclePageIndicatorStyle 的 样式
| |
<resources>
<style name="AppBaseTheme" parent="android:Theme.Light">
</style>
<style name="AppTheme" parent="android:Theme.Light.NoTitleBar">
<item name="vpiCirclePageIndicatorStyle">@style/TabStyle</item> -
</style>
<style name="TabStyle" parent="Widget.TabPageIndicator">
<item name="android:textColor">#FF33AA33</item>
<item name="android:textSize">14sp</item>
<item name="android:textStyle">italic</item>
<item name="android:paddingLeft">16dp</item>
<item name="android:paddingRight">16dp</item>
<item name="android:fadingEdge">horizontal</item>
<item name="android:fadingEdgeLength">8dp</item>
</style>
这篇关于Failed to find style 'vpiCirclePageIndicatorStyle' in current theme的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!