Note that there are some explanatory texts on larger screens.

plurals
  1. POFailed to find style vpiCirclePageIndicatorStyle
    text
    copied!<p>I wanted to have viewpageindicator in my project, but am having trouble importing it. I've got errors in my XML.</p> <pre><code>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 </code></pre> <p>My XML file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;android.support.v4.view.ViewPager android:id="@+id/pager" android:layout_width="fill_parent" android:layout_height="fill_parent" /&gt; &lt;com.viewpagerindicator.CirclePageIndicator android:id="@+id/indicator" android:layout_width="248dp" android:layout_height="30dp" android:layout_alignParentBottom="true" android:layout_below="@id/pager" android:layout_centerHorizontal="true" android:layout_marginBottom="30dp" android:padding="3dip" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>My updated res/values/styles.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;style name="hololightnoactionbar" parent="android:Theme.Holo.Light"&gt; &lt;item name="android:windowActionBar"&gt;false&lt;/item&gt; &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt; &lt;/style&gt; &lt;style name="dividerstyle" parent="@android:style/Widget.ListView"&gt; &lt;item name="android:cacheColorHint"&gt;@android:color/transparent&lt;/item&gt; &lt;item name="android:divider"&gt;@drawable/list_divider&lt;/item&gt; &lt;item name="android:dividerHeight"&gt;1px&lt;/item&gt; &lt;/style&gt; &lt;style name="roundedwhitebox"&gt; &lt;item name="android:background"&gt;@drawable/roundedwhitebox&lt;/item&gt; &lt;/style&gt; &lt;style name="roundedlightgraybox"&gt; &lt;item name="android:background"&gt;@drawable/roundedlightgraybox&lt;/item&gt; &lt;/style&gt; &lt;style name="rotatingProgressCircle"&gt; &lt;item name="android:indeterminateDrawable"&gt;@drawable/circleindeterminate&lt;/item&gt; &lt;/style&gt; &lt;style name="StyledIndicators" parent="@android:style/Theme.Light"&gt; &lt;item name="vpiCirclePageIndicatorStyle"&gt;@style/CustomCirclePageIndicator&lt;/item&gt; &lt;item name="vpiLinePageIndicatorStyle"&gt;@style/CustomLinePageIndicator&lt;/item&gt; &lt;item name="vpiTitlePageIndicatorStyle"&gt;@style/CustomTitlePageIndicator&lt;/item&gt; &lt;item name="vpiTabPageIndicatorStyle"&gt;@style/CustomTabPageIndicator&lt;/item&gt; &lt;item name="vpiUnderlinePageIndicatorStyle"&gt;@style/CustomUnderlinePageIndicator&lt;/item&gt; &lt;/style&gt; &lt;style name="CustomTitlePageIndicator"&gt; &lt;item name="android:background"&gt;#18FF0000&lt;/item&gt; &lt;item name="footerColor"&gt;#FFAA2222&lt;/item&gt; &lt;item name="footerLineHeight"&gt;1dp&lt;/item&gt; &lt;item name="footerIndicatorHeight"&gt;3dp&lt;/item&gt; &lt;item name="footerIndicatorStyle"&gt;underline&lt;/item&gt; &lt;item name="android:textColor"&gt;#AA000000&lt;/item&gt; &lt;item name="selectedColor"&gt;#FF000000&lt;/item&gt; &lt;item name="selectedBold"&gt;true&lt;/item&gt; &lt;/style&gt; &lt;style name="CustomLinePageIndicator"&gt; &lt;item name="strokeWidth"&gt;4dp&lt;/item&gt; &lt;item name="lineWidth"&gt;30dp&lt;/item&gt; &lt;item name="unselectedColor"&gt;#FF888888&lt;/item&gt; &lt;item name="selectedColor"&gt;#FF880000&lt;/item&gt; &lt;/style&gt; &lt;style name="CustomCirclePageIndicator"&gt; &lt;item name="fillColor"&gt;#FF888888&lt;/item&gt; &lt;item name="strokeColor"&gt;#FF000000&lt;/item&gt; &lt;item name="strokeWidth"&gt;2dp&lt;/item&gt; &lt;item name="radius"&gt;10dp&lt;/item&gt; &lt;item name="centered"&gt;true&lt;/item&gt; &lt;/style&gt; &lt;style name="CustomTabPageIndicator" parent="Widget.TabPageIndicator"&gt; &lt;item name="android:textAppearance"&gt;@style/CustomTabPageIndicator.Text&lt;/item&gt; &lt;item name="android:textColor"&gt;#FF555555&lt;/item&gt; &lt;item name="android:textSize"&gt;16sp&lt;/item&gt; &lt;item name="android:divider"&gt;@drawable/custom_tab_indicator_divider&lt;/item&gt; &lt;item name="android:dividerPadding"&gt;10dp&lt;/item&gt; &lt;item name="android:showDividers"&gt;middle&lt;/item&gt; &lt;item name="android:paddingLeft"&gt;8dp&lt;/item&gt; &lt;item name="android:paddingRight"&gt;8dp&lt;/item&gt; &lt;item name="android:fadingEdge"&gt;horizontal&lt;/item&gt; &lt;item name="android:fadingEdgeLength"&gt;8dp&lt;/item&gt; &lt;/style&gt; &lt;style name="CustomTabPageIndicator.Text" parent="android:TextAppearance.Medium"&gt; &lt;item name="android:typeface"&gt;monospace&lt;/item&gt; &lt;/style&gt; &lt;style name="CustomUnderlinePageIndicator"&gt; &lt;item name="selectedColor"&gt;#FFCC0000&lt;/item&gt; &lt;item name="android:background"&gt;#FFCCCCCC&lt;/item&gt; &lt;item name="fadeLength"&gt;1000&lt;/item&gt; &lt;item name="fadeDelay"&gt;1000&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p>My project structure is here, where vpilibrary is the imported viewpageindicator library</p> <p><img src="https://i.stack.imgur.com/TIWdp.png" alt="enter image description here"></p> <p>What's wrong with it? and let me know if you need more files for debugging. Thx</p> <p>ps:My minsdkversion and targetsdkversion is both 16</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload