//时间
rv.setPlayDelay(2000); //监听
rv.setAdapter(new StaticPagerAdapter() { @Override public View getView(ViewGroup container, int position) { return imglist.get(position); } @Override public int getCount() { return imglist.size(); } });
//自动轮播图依赖
compile 'com.jude:rollviewpager:1.4.5'
//布局
<com.jude.rollviewpager.RollPagerView android:layout_width="match_parent" android:layout_height="300dp" android:id="@+id/rv" ></com.jude.rollviewpager.RollPagerView>