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

ViewWrapper on RecyclerExampleAdapter #101

Closed timemake closed 6 years ago

timemake commented 6 years ago

I made it work for RecyclerExampleAdapter without using ViewWrapper. However, itemView setOnClickListener is not working correctly. I couldn't find out any example in the source code. Please help!

        itemView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                int itemPosition = getLayoutPosition();
                Toast.makeText(mContext, "" + items.get(itemPosition), Toast.LENGTH_SHORT).show();

            }

});

timemake commented 6 years ago

I figured out about click event so the library works fine on ListView and RecyclerView successfully. Thank you very much for your good tutorial and keep up the good work!