@Test public void prepare_shouldAttachClickListenersToViewTree() { RelativeLayout relativeLayout = new RelativeLayout(context); Button callToActionView = new Button(context); callToActionView.setId((int) Utils.generateUniqueId()); relativeLayout.addView(callToActionView); assertThat(relativeLayout.performClick()).isFalse(); assertThat(callToActionView.performClick()).isFalse(); subject.prepare(relativeLayout); assertThat(relativeLayout.performClick()).isTrue(); assertThat(callToActionView.performClick()).isTrue(); }
public void prepare(@NonNull final View view) { if (isDestroyed()) { return; } if (!isOverridingClickTracker()) { setOnClickListener(view, new NativeViewClickListener()); } mNativeAd.prepare(view); }
NativeResponse { public void prepare(@NonNull final View view) { if (isDestroyed()) { return; } if (!isOverridingClickTracker()) { setOnClickListener(view, new NativeViewClickListener()); } mNativeAd.prepare(view); } }
NativeResponse { public void prepare(@NonNull final View view) { if (isDestroyed()) { return; } if (!isOverridingClickTracker()) { setOnClickListener(view, new NativeViewClickListener()); } mNativeAd.prepare(view); } NativeResponse(@NonNull final Context context,
            @NonNull final String impressionUrl,
            @NonNull final String clickUrl,
            @NonNull final String adUnitId,
            @NonNull final NativeAdInterface nativeAd,
            @NonNull final MoPubNativeEventListener moPubNativeEventListener); }
NativeResponse { public void prepare(@NonNull final View view) { if (isDestroyed()) { return; } if (!isOverridingClickTracker()) { setOnClickListener(view, new NativeViewClickListener()); } mNativeAd.prepare(view); } NativeResponse(@NonNull final Context context,
            @NonNull final String impressionUrl,
            @NonNull final String clickUrl,
            @NonNull final String adUnitId,
            @NonNull final NativeAdInterface nativeAd,
            @NonNull final MoPubNativeEventListener moPubNativeEventListener); @Override String toString(); @NonNull String getAdUnitId(); @Nullable String getMainImageUrl(); @Nullable String getIconImageUrl(); @Nullable String getClickDestinationUrl(); @Nullable String getCallToAction(); @Nullable String getTitle(); @Nullable String getText(); @NonNull List<String> getImpressionTrackers(); @NonNull String getClickTracker(); @Nullable Double getStarRating(); int getImpressionMinTimeViewed(); int getImpressionMinPercentageViewed(); @Nullable Object getExtra(final String key); @NonNull Map<String, Object> getExtras(); boolean isOverridingImpressionTracker(); boolean isOverridingClickTracker(); void prepare(@NonNull final View view); void recordImpression(@Nullable final View view); void handleClick(@Nullable final View view); void clear(@NonNull final View view); void destroy(); void loadMainImage(@Nullable final ImageView imageView); void loadIconImage(@Nullable final ImageView imageView); void loadExtrasImage(final String key, final ImageView imageView); boolean getRecordedImpression(); boolean isClicked(); boolean isDestroyed(); @Nullable @Deprecated String getSubtitle(); }
NativeResponse { public void prepare(@NonNull final View view) { if (isDestroyed()) { return; } if (!isOverridingClickTracker()) { setOnClickListener(view, new NativeViewClickListener()); } mNativeAd.prepare(view); } NativeResponse(@NonNull final Context context,
            @NonNull final String impressionUrl,
            @NonNull final String clickUrl,
            @NonNull final String adUnitId,
            @NonNull final NativeAdInterface nativeAd,
            @NonNull final MoPubNativeEventListener moPubNativeEventListener); @Override String toString(); @NonNull String getAdUnitId(); @Nullable String getMainImageUrl(); @Nullable String getIconImageUrl(); @Nullable String getClickDestinationUrl(); @Nullable String getCallToAction(); @Nullable String getTitle(); @Nullable String getText(); @NonNull List<String> getImpressionTrackers(); @NonNull String getClickTracker(); @Nullable Double getStarRating(); int getImpressionMinTimeViewed(); int getImpressionMinPercentageViewed(); @Nullable Object getExtra(final String key); @NonNull Map<String, Object> getExtras(); boolean isOverridingImpressionTracker(); boolean isOverridingClickTracker(); void prepare(@NonNull final View view); void recordImpression(@Nullable final View view); void handleClick(@Nullable final View view); void clear(@NonNull final View view); void destroy(); void loadMainImage(@Nullable final ImageView imageView); void loadIconImage(@Nullable final ImageView imageView); void loadExtrasImage(final String key, final ImageView imageView); boolean getRecordedImpression(); boolean isClicked(); boolean isDestroyed(); @Nullable @Deprecated String getSubtitle();  }