SDK Native - Customizations

Native SDK — Customizations

Prerequisite: Complete the Native SDK - Quick Start first.

These customizations require no custom layout XML — you configure the built-in default renderer or extend it with small tweaks.


1. Configuration Options

1.1 Scroll Direction

// Horizontal (default)
adView.setOrientation(RecyclerView.HORIZONTAL);

// Vertical list
adView.setOrientation(RecyclerView.VERTICAL);

1.2 Maximum Number of Campaigns

1.3 Nested Scrolling

If your MCNativeAdView is not inside a ScrollView, you can disable nested scrolling (enabled by default):

1.4 Open Campaign Details In-App

By default, tapping a campaign opens in the device's external browser. To keep users inside your app:

If you enable this, register the WebView activity in your AndroidManifest.xml:


2. Change the Currency Icon

The default renderer shows a coin icon next to the reward value.

You can replace it in two ways:

Option A: Set a custom URL

Option B: Use a local drawable

To use a drawable from your app's resources, disable the URL-based icon and set it in onBindCampaign:

Important: Call setCurrencyIconUrl("") when using a local drawable. This prevents the default CDN icon from loading asynchronously and overwriting your resource.


3. Customize Text Colors

Override onBindCampaign and change colors after the default binding:

Default Layout View IDs

View ID
Type
Description

io.mychips.offerwall.R.id.mc_iv_thumbnail

ImageView

Campaign image

io.mychips.offerwall.R.id.mc_tv_name

TextView

Campaign name

io.mychips.offerwall.R.id.mc_tv_reward

TextView

Reward value

io.mychips.offerwall.R.id.mc_iv_currency

ImageView

Currency icon

io.mychips.offerwall.R.id.mc_tv_badge_promo

TextView

Promo badge

io.mychips.offerwall.R.id.mc_tv_badge_progress

TextView

In Progress badge


4. Custom Loading View

By default, the SDK shows a pulsing skeleton placeholder while loading.

You can replace it:

Or doing something more complex with text as well:

Pass null to restore the default skeleton:


5. Custom Click Handler

Override the default click behavior per-view:

Tip: You can configure the default click behavior globally without writing a custom click handler. Call MCOfferwallSDK.SetOpenInApp(true) to open campaign details in an in-app WebView instead of the external browser. See the Open Campaign Details In-App.


6. Loading Lifecycle Listener

Monitor loading state for your own UI logic:


Next Steps

Last updated