-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
只有黑背景没有viewpager显示 #18
Comments
我这样模拟加几个进去 只有背景没有内容 |
我模拟加了4组数据进去 但是广告无法显示 |
人呢 作者呢 |
里面有一个DisplayUtil,你在使用前应该先拿到屏幕的相关参数值设置进去。应该是这里没设置出现的这个问题。 |
的确是@chenxi0203说的那样,作者的库里面的manifest文件设置了《application》,然后在LApplication文件里进行了初始化,如果我们直接引用作者的库,会报错,下载该库,用import的方式作为module引入,删除manifest文件的《application》标签,然后在AdManager构造方法里面进行初始化(LApplication的初始化方法拷贝过来) |
棒棒哒!已成功解决!。 |
List datas=new ArrayList();
//
// // for (XGPostBean.AdInfoBean info: ads.getAdInfo()) {
// for(int i=0;i<4;i++){
//
// //构造一个AdInfo
// // Logger.i("-----广告info------>"+info.getImg()+" "+info.getInformUrl()+" "+info
// // .getInformUrlType());
// AdInfo adinfo=new AdInfo();
// adinfo.setActivityImg("https://raw.githubusercontent.com/yipianfengye/android-adDialog/master/images/testImage1.png");
// adinfo.setTitle("了解详情");
// adinfo.setAdId(i+"");
// datas.add(adinfo);
//
// }
//
// AdManager adManager=new AdManager(getActivity(),datas);
//
// adManager.setOnImageClickListener(new AdManager.OnImageClickListener() {
// @OverRide
// public void onImageClick(View view, AdInfo advInfo) {
// Toast.makeText(getActivity(), "您点击了ViewPagerItem...", Toast.LENGTH_SHORT).show();
// }
// })
// .setPadding(100)
// .setWidthPerHeight(0.5f)
// .showAdDialog(AdConstant.ANIM_UP_TO_DOWN);
The text was updated successfully, but these errors were encountered: