clockbyte / admobadapter

It wraps your Adapter to display Admob native ads and banners in a ListView/RecyclerView data set. It based on the Yahoo fetchr project https://github.com/yahoo/fetchr
Apache License 2.0
237 stars 75 forks source link

Changing the adsize and showing different ads in listview. #52

Closed vivekkarn closed 7 years ago

vivekkarn commented 7 years ago

I am using this library for adding adding Native Ads Express to listview via an adapter to my app . I'm extremely thankful for making this job easier to newbies but I need some help. I'm unable to change the AdSize as well as all the ads in the listview are same. Isn't it possible to show different ads in same listview? mPointList = mDBHelper.getListPoints(table); adapter = new ListPointAdapter(this, mPointList); String[] testDevicesIds = new String[]{getString(R.string.testDeviceID), AdRequest.DEVICE_ID_EMULATOR}; adapterWrapper = new AdmobAdapterWrapper(this, testDevicesIds); adapterWrapper.setAdapter(adapter); adapterWrapper.setLimitOfAds(8); adapterWrapper.setNoOfDataBetweenAds(30); adapterWrapper.setFirstAdIndex(10); listDetail.setAdapter(adapterWrapper); Please help.

kot331107 commented 7 years ago

@vivekkarn Hi!

I guess it is the thing you are looking for https://github.com/clockbyte/admobadapter/wiki/Cookbook#in-case-you-want-to-use-a-multiple-unit-ids

vivekkarn commented 7 years ago

Pardon me, but that example is for recyclerview not listview.

kot331107 commented 7 years ago

@vivekkarn the same should work for AdmobExpressAdapterWrapper