This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avocarrotCustom = new AvocarrotCustom(this, BuildConfig.AvocarrotApiKey, BuildConfig.PLACEMENT_CUSTOM); | |
avocarrotCustom.setSandbox(BuildConfig.SANDBOX); | |
avocarrotCustom.setLogger(true, "ALL"); | |
avocarrotCustom.setListener(new AvocarrotCustomListener() { | |
@Override | |
public void onAdLoaded(List<CustomModel> ads) { | |
super.onAdLoaded(ads); | |
if ((ads==null)||(ads.size()==0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AvocarrotInterstitial interstitial = new AvocarrotInterstitial(this, "api key", "Placement key"); | |
interstitial.setSandbox(true); | |
interstitial.setLogger(true, "ALL"); | |
interstitial.setListener(new AvocarrotInterstitialListener() { | |
boolean isClicked = false; | |
@Override | |
public void onAdDisplayed() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace | |
recyclerView.setAdapter( new DanceAdapter(dances) ); | |
with | |
AvocarrotInstreamRecyclerView avocarrotInstreamRecyclerView = new AvocarrotInstreamRecyclerView(new DanceAdapter(dances), this, "<appId>", "<placement>"); | |
recyclerView.setAdapter( avocarrotInstreamRecyclerView ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
RecyclerView recyclerView = new RecyclerView(this); | |
setContentView(recyclerView); | |
final String[] dances = new String[]{ |