Open keaitao0321 opened 7 years ago
//初始banner数据 mBanner.setAdapter(new BGABanner.Adapter<ImageView, Integer>() { @Override public void fillBannerItem(BGABanner bgaBanner, ImageView imageView, Integer integer, int i) { Glide.with(imageView.getContext()) .load(integer) .placeholder(R.drawable.img_empty) .error(R.drawable.img_empty) .centerCrop() .dontAnimate() .into(imageView); } }); mBanner.setData(R.mipmap.guide1, R.mipmap.guide2, R.mipmap.guide3, R.mipmap.guide4);
布局 <cn.bingoogolapple.bgabanner.BGABanner android:id="@+id/banner" style="@style/BannerDefaultStyle" android:layout_width="match_parent" android:layout_height="340px" app:banner_pointContainerBackground="@drawable/home_banner_zhezhao" app:banner_pointDrawable="@drawable/selector_home_banner_point"> </cn.bingoogolapple.bgabanner.BGABanner>
布局 <cn.bingoogolapple.bgabanner.BGABanner android:id="@+id/banner" style="@style/BannerDefaultStyle" android:layout_width="match_parent" android:layout_height="340px" app:banner_pointContainerBackground="@drawable/home_banner_zhezhao" app:banner_pointDrawable="@drawable/selector_home_banner_point"> </cn.bingoogolapple.bgabanner.BGABanner>