Android安卓中使用ViewPagerIndicator,已经关联library了,布局文件完全拷贝过来的,还是出现这个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 'vpiTabPageIndicatorStyle' in current theme
而且运行后这个TabPagerIndicator不显示,
源码:
adapter = new MyAdapter();
vp.setAdapter(adapter); //viewpager
tpi.setVisibility(View.VISIBLE); //TabPagerIndicator
tpi.setViewPager(vp);
布局文件:
<?xml version="1.0" encoding="utf-8"?>
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.viewpagerindicator.TabPageIndicator
android:id="@+id/indicator_newcontext_index"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:visibility="gone"
/>
<android.support.v4.view.ViewPager
android:id="@+id/vp_newcontext_index"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
/>