//
@Override
public void fillBannerItem(BGABanner banner, ImageView itemView, @Nullable String model, int position) {
Glide.with(this)
.load(model)
.apply(new RequestOptions().placeholder(R.drawable.holder).error(R.drawable.holder).dontAnimate().centerCrop())
.into(itemView);
}
报错
android.content.res.Resources$NotFoundException: Resource ID #0x7f07007c
at android.content.res.Resources.getValue(Resources.java:1544)
at android.content.res.Resources.getDrawable(Resources.java:918)
at android.support.v4.content.res.ResourcesCompat.getDrawable(ResourcesCompat.java:80)
at com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat.loadDrawableV4(DrawableDecoderCompat.java:76)
at com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat.getDrawable(DrawableDecoderCompat.java:64)
at com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat.getDrawable(DrawableDecoderCompat.java:41)
at com.bumptech.glide.request.SingleRequest.loadDrawable(SingleRequest.java:407)
at com.bumptech.glide.request.SingleRequest.getPlaceholderDrawable(SingleRequest.java:388)
at com.bumptech.glide.request.SingleRequest.begin(SingleRequest.java:269)
at com.bumptech.glide.manager.RequestTracker.runRequest(RequestTracker.java:44)
at com.bumptech.glide.RequestManager.track(RequestManager.java:614)
at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:622)
at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:682)
at com.ihuanyan.basetest.ui.fragment.home.child.TabOneFragment$1.fillBannerItem(TabOneFragment.java:204)
at com.ihuanyan.basetest.ui.fragment.home.child.TabOneFragment$1.fillBannerItem(TabOneFragment.java:198)
at cn.bingoogolapple.bgabanner.BGABanner$PageAdapter.instantiateItem(BGABanner.java:912)
at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1004)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1152)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1086)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1616)
at android.view.View.measure(View.java:19140)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:825)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:511)
at cn.bingoogolapple.bgabanner.BGABanner.onMeasure(BGABanner.java:581)
at android.view.View.measure(View.java:19140)
at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:1212)
at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1552)
at android.view.View.measure(View.java:19140)
at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516)
at android.view.View.measure(View.java:19140)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1632)
at android.view.View.measure(View.java:19140)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19140)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.view.View.measure(View.java:19140)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.view.View.measure(View.java:19140)
at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:1212)
at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1552)
at android.view.View.measure(View.java:19140)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
at android.view.View.measure(View.java:19140)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116)
at android.widget.Li
// imageList = new ArrayList<>();
List tipList = new ArrayList<>();
imageList.add("http://pic1.win4000.com/wallpaper/0/5844cd4a2de23.jpg");
imageList.add("http://img17.3lian.com/201612/14/db58abb171f0cba760842b34a06efecf.jpg");
imageList.add("http://img17.3lian.com/201612/14/22645c59bce11e9e535ebaf324a097b0.jpg");
imageList.add("http://img.mp.sohu.com/upload/20170512/2e240eb672f649f382a0cede861301c2_th.png");
for (int i = 0; i < 4; i++) {
tipList.add("");
}
banner.setAdapter(this);
banner.setData(imageList,tipList);
private void initBanner() { List
// @Override public void fillBannerItem(BGABanner banner, ImageView itemView, @Nullable String model, int position) { Glide.with(this) .load(model) .apply(new RequestOptions().placeholder(R.drawable.holder).error(R.drawable.holder).dontAnimate().centerCrop()) .into(itemView); } 报错 android.content.res.Resources$NotFoundException: Resource ID #0x7f07007c at android.content.res.Resources.getValue(Resources.java:1544) at android.content.res.Resources.getDrawable(Resources.java:918) at android.support.v4.content.res.ResourcesCompat.getDrawable(ResourcesCompat.java:80) at com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat.loadDrawableV4(DrawableDecoderCompat.java:76) at com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat.getDrawable(DrawableDecoderCompat.java:64) at com.bumptech.glide.load.resource.drawable.DrawableDecoderCompat.getDrawable(DrawableDecoderCompat.java:41) at com.bumptech.glide.request.SingleRequest.loadDrawable(SingleRequest.java:407) at com.bumptech.glide.request.SingleRequest.getPlaceholderDrawable(SingleRequest.java:388) at com.bumptech.glide.request.SingleRequest.begin(SingleRequest.java:269) at com.bumptech.glide.manager.RequestTracker.runRequest(RequestTracker.java:44) at com.bumptech.glide.RequestManager.track(RequestManager.java:614) at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:622) at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:682) at com.ihuanyan.basetest.ui.fragment.home.child.TabOneFragment$1.fillBannerItem(TabOneFragment.java:204) at com.ihuanyan.basetest.ui.fragment.home.child.TabOneFragment$1.fillBannerItem(TabOneFragment.java:198) at cn.bingoogolapple.bgabanner.BGABanner$PageAdapter.instantiateItem(BGABanner.java:912) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1004) at android.support.v4.view.ViewPager.populate(ViewPager.java:1152) at android.support.v4.view.ViewPager.populate(ViewPager.java:1086) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1616) at android.view.View.measure(View.java:19140) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:825) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:511) at cn.bingoogolapple.bgabanner.BGABanner.onMeasure(BGABanner.java:581) at android.view.View.measure(View.java:19140) at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:1212) at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1552) at android.view.View.measure(View.java:19140) at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450) at android.widget.FrameLayout.onMeasure(FrameLayout.java:223) at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516) at android.view.View.measure(View.java:19140) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1632) at android.view.View.measure(View.java:19140) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723) at android.widget.LinearLayout.measureVertical(LinearLayout.java:788) at android.widget.LinearLayout.onMeasure(LinearLayout.java:648) at android.view.View.measure(View.java:19140) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116) at android.widget.FrameLayout.onMeasure(FrameLayout.java:223) at android.view.View.measure(View.java:19140) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116) at android.widget.FrameLayout.onMeasure(FrameLayout.java:223) at android.view.View.measure(View.java:19140) at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:1212) at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1552) at android.view.View.measure(View.java:19140) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116) at android.widget.FrameLayout.onMeasure(FrameLayout.java:223) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141) at android.view.View.measure(View.java:19140) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6116) at android.widget.Li