com.mopub.nativeads.ViewBinder Java Examples
The following examples show how to use
com.mopub.nativeads.ViewBinder.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SearchResultFragment.java From aptoide-client-v8 with GNU General Public License v3.0 | 5 votes |
@NonNull private ViewBinder getMoPubViewBinder() { return new ViewBinder.Builder(R.layout.search_ad).titleId(R.id.app_name) .mainImageId(R.id.native_main_image) .addExtra("primary_ad_view_layout", R.id.primary_ad_view_layout) .iconImageId(R.id.app_icon) .build(); }
Example #2
Source File: SimilarAppsViewHolder.java From aptoide-client-v8 with GNU General Public License v3.0 | 5 votes |
@NonNull private ViewBinder getMoPubAdViewBinder() { return new ViewBinder.Builder(R.layout.displayable_grid_ad).titleId(R.id.name) .iconImageId(R.id.icon) .mainImageId(R.id.native_main_image) .addExtra("primary_ad_view_layout", R.id.primary_ad_view_layout) .build(); }
Example #3
Source File: PoemHistoryActivity.java From cannonball-android with Apache License 2.0 | 5 votes |
private void setUpPoemList() { shareListener = new OnShareClickListener(); deleteListener = new OnDeleteClickListener(); final ListView poemsList = (ListView) findViewById(R.id.poem_history_list); adapter = new PoemCursorAdapter( getApplicationContext(), null, CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER); // MoPub integration final ViewBinder mopubViewBinder = new ViewBinder.Builder(R.layout.native_ad_layout) .mainImageId(R.id.native_ad_main_image) .iconImageId(R.id.native_ad_icon_image) .titleId(R.id.native_ad_title) .textId(R.id.native_ad_text) .build(); MoPubNativeAdPositioning.MoPubServerPositioning adPositioning = MoPubNativeAdPositioning.serverPositioning(); final MoPubNativeAdRenderer adRenderer = new MoPubNativeAdRenderer(mopubViewBinder); moPubAdAdapter = new MoPubAdAdapter(this, adapter, adPositioning); moPubAdAdapter.registerAdRenderer(adRenderer); poemsList.setAdapter(moPubAdAdapter); }
Example #4
Source File: SearchResultFragment.java From aptoide-client-v8 with GNU General Public License v3.0 | 4 votes |
public void configureAdRenderers() { ViewBinder viewBinder = getMoPubViewBinder(); moPubRecyclerAdapter.registerAdRenderer(new MoPubStaticNativeAdRenderer(viewBinder)); moPubRecyclerAdapter.registerAdRenderer(new InMobiNativeAdRenderer(viewBinder)); }
Example #5
Source File: SimilarAppsViewHolder.java From aptoide-client-v8 with GNU General Public License v3.0 | 4 votes |
private void configureAdRenderers() { ViewBinder viewBinder = getMoPubAdViewBinder(); moPubSimilarAppsRecyclerAdapter.registerAdRenderer(new MoPubStaticNativeAdRenderer(viewBinder)); moPubSimilarAppsRecyclerAdapter.registerAdRenderer(new InMobiNativeAdRenderer(viewBinder)); }