在为页面滑动制作圆形页面指示器时,我遇到了错误
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout android:orientation="horizontal" android:id="@+id/winyear"
android:layout_width="fill_parent"
android:layout_height="wrap_content" android:background="#36648B" >
<TextView android:layout_width="wrap_content" android:text="Product" android:layout_centerInParent="true"
android:layout_height="wrap_content" android:id="@+id/produt" />
</RelativeLayout>
<android.support.v4.view.ViewPager
android:id="@+id/pager" android:layout_below="@+id/winyear"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<com.viewpagerindicator.CirclePageIndicator
android:id="@+id/indicator" android:layout_below="@+id/pager"
android:padding="10dip"
android:layout_height="wrap_content"
android:layout_width="fill_parent" />
</RelativeLayout>
public class Details extends FragmentActivity{
ViewPager pager;
MyFragmentPagerAdapter pagerAdapter;
CirclePageIndicator mIndicator;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.detail);
pager = (ViewPager) findViewById(R.id.pager);
FragmentManager fm = getSupportFragmentManager();
pagerAdapter = new MyFragmentPagerAdapter(fm,currency);
pager.setAdapter(pagerAdapter);
mIndicator = (CirclePageIndicator)findViewById(R.id.indicator);
mIndicator.setViewPager(pager);
}
findClass(PathClassLoader.java:240) 11-29 13:08:52.579: E/AndroidRuntime(470): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 11-29 13:08:52.579: E/ AndroidRuntime(470): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 11-29 13:08:52.579: E/AndroidRuntime(470): at android.view.LayoutInflater.createView(LayoutInflater.java:471 ) 11-29 13:08:52.579: E/AndroidRuntime(470): 在 android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570) 11-29 13:08:52.579: E/AndroidRuntime(470): .. . 20 more 11-29 13:13:52.652: I/Process(470): 发送信号。PID:470 SIG:9 loadClass(ClassLoader.java:511) 11-29 13:08:52.579: E/AndroidRuntime(470): 在 android.view.LayoutInflater.createView(LayoutInflater.java:471) 11-29 13:08:52.579: E/ AndroidRuntime(470): 在 android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570) 11-29 13:08:52.579: E/AndroidRuntime(470): ... 20 更多 11-29 13:13:52.652: I/Process(470):发送信号。PID:470 SIG:9 loadClass(ClassLoader.java:511) 11-29 13:08:52.579: E/AndroidRuntime(470): 在 android.view.LayoutInflater.createView(LayoutInflater.java:471) 11-29 13:08:52.579: E/ AndroidRuntime(470): 在 android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570) 11-29 13:08:52.579: E/AndroidRuntime(470): ... 20 更多 11-29 13:13:52.652: I/Process(470):发送信号。PID:470 SIG:9