Skip to content

Instantly share code, notes, and snippets.

@ayltai
Created February 12, 2017 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayltai/be3670ea6f27705f7d7381bb6ca37d1c to your computer and use it in GitHub Desktop.
Save ayltai/be3670ea6f27705f7d7381bb6ca37d1c to your computer and use it in GitHub Desktop.
@Override
protected void prepare(@NonNull final NativeAppInstallAdView adView, @NonNull final NativeAppInstallAd nativeAd) {
final TextView adTitle = (TextView)adView.findViewById(R.id.ad_title);
final TextView adBody = (TextView)adView.findViewById(R.id.ad_body);
final ImageView adImage = (ImageView)adView.findViewById(R.id.ad_image);
final TextView adCallToAction = (TextView)adView.findViewById(R.id.ad_call_to_action);
adView.setHeadlineView(adTitle);
adView.setBodyView(adBody);
adView.setImageView(adImage);
adView.setCallToActionView(adCallToAction);
}
@Override
protected void prepare(@NonNull final NativeContentAdView adView, @NonNull final NativeContentAd nativeAd) {
final TextView adTitle = (TextView)adView.findViewById(R.id.ad_title);
final TextView adBody = (TextView)adView.findViewById(R.id.ad_body);
final ImageView adImage = (ImageView)adView.findViewById(R.id.ad_image);
final TextView adCallToAction = (TextView)adView.findViewById(R.id.ad_call_to_action);
adView.setHeadlineView(adTitle);
adView.setBodyView(adBody);
adView.setImageView(adImage);
adView.setCallToActionView(adCallToAction);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment