googlecodelabs / admob-native-advanced-feed

Apache License 2.0
53 stars 30 forks source link

RecyclerView not showing when phone not connected to Internet #15

Open therealchrif opened 4 years ago

therealchrif commented 4 years ago

The loading fragment keeps loading when no Internet! Infinite loading

zhromas commented 3 years ago

adLoader.isLoading() returns TRUE if no Internet. How to solve it? Remove this check?

`
public void onAdFailedToLoad(int errorCode) {

           // A native ad failed to load, check if the ad loader has finished loading and if so, insert the ads into the list.

            Log.e("MainActivity", "The previous native ad failed to load. Attempting to load another.");

            if (!adLoader.isLoading()) {
                insertAdsInMenuItems();
            }
        }`