Giter Site home page Giter Site logo

Comments (8)

gssinghgautam avatar gssinghgautam commented on May 20, 2024

can you please help me regarding this

from admobadapter.

sunilsunny565 avatar sunilsunny565 commented on May 20, 2024

I am also having this issue .Any update on this . ?

from admobadapter.

sunilsunny565 avatar sunilsunny565 commented on May 20, 2024

For me the issue was inside AdmobFetcherExpress if the add is failed to load then the parent view visibilty was set as gone. like this

 if(adViewEx.getAdView().getParent()!=null)
            ((View) adViewEx.getAdView().getParent()).setVisibility(View.GONE); 

I have changed this to this

  if(adViewEx.getAdView() !=null)
             adViewEx.getAdView().setVisibility(View.GONE); 

So that only the adview visibily is gone.

from admobadapter.

diabloo avatar diabloo commented on May 20, 2024

same issue , any solution for this ?

from admobadapter.

sunilsunny565 avatar sunilsunny565 commented on May 20, 2024

@diabloo Did you tried my workaround ?. Or you can add the adView to a Realative or Linear Layout so that only it's parent's visibility will be gone.

from admobadapter.

kot331107 avatar kot331107 commented on May 20, 2024

Guys, I'll check it today.

from admobadapter.

diabloo avatar diabloo commented on May 20, 2024

@sunilsunny565 i tried it but the application crash
java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. Make sure your adapter calls notifyDataSetChanged() when its content changes.

edit
this line in AdmobFetcherExpress#onFailedToLoad causes the crash :
mPrefetchedAds.remove(adViewEx);

from admobadapter.

sunilsunny565 avatar sunilsunny565 commented on May 20, 2024

@kot331107 Thanks it's working in the latest build.Only one issue an empty view will be there as long as the ad fails. I tried something like this in AdmobExpressAdapterWrapper to get rid of the problem .

   @Override
    public View getView(int position, View convertView, ViewGroup parent) {
      if(getItemViewType(position) == getViewTypeAdExpress() && isNetworkAvailable)
        {
         // rest of code
        return wrapper;
        }else{
          //rest of code
        return mAdapter.getView(origPos, convertView, parent);
       }
  }

That is make a network check on getView ,but in this case I am getting duplicate view of listItem on ad position for sometime and then it disappears.Is there a way to get rid off that empty cell ?. Is there a way to add the view only if the ad is loaded.?

from admobadapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.