Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For creating a wrapper, you can follow this small guide: https://refinery89.atlassian.net/wiki/x/A4DcSQ. In the guide we talk about different ways to create the wrapper this is the recommended way:

This code goes inside the root of your layout file.

Code Block
languagexml
# activity_main.xml
...
<LinearLayout
    android:id="@+id/wrapper"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:layout_centerHorizontal="true"
    android:layout_alignParentBottom="true">
</LinearLayout>
...

Show the Ad

In the example we are using a Test Id.

If you are not testing the app, change it for the proper ID that you got from us.

Get this view from an activity or fragment, a way to do it could be:

Code Block
languagekotlin
# MainActivity.kt
val wrapper = <Get Your wrapper>findViewById(R.id.wrapper)
val bannerConfigId = ConfigBuilder.BANNER_TEST_R89_CONFIG_ID

RefineryAdFactory.createBanner(bannerConfigId, wrapper)

...

Code Block
languagekotlin
# MainActivity.kt
val wrapper = <Get Your wrapper>findViewById(R.id.wrapper)
val bannerConfigId = ConfigBuilder.BANNER_TEST_R89_CONFIG_ID
val bannerLifecycleListener = <create the listener with a method or inplace>

RefineryAdFactory.createBanner(bannerConfigId, wrapper, bannerLifecycleListener)

...