{"id":10019,"date":"2024-06-30T11:42:28","date_gmt":"2024-06-30T09:42:28","guid":{"rendered":"https:\/\/refinery89.com\/docs\/monetize-app-sdk-documentation\/use-manual\/ad-formats\/infinite-scroll\/"},"modified":"2024-07-02T11:45:48","modified_gmt":"2024-07-02T09:45:48","slug":"infinite-scroll","status":"publish","type":"docs","link":"https:\/\/refinery89.com\/de\/docs\/monetize-app-sdk-documentation\/use-manual\/ad-formats\/infinite-scroll\/","title":{"rendered":"Infinite Scroll"},"content":{"rendered":"<h1 id=\"Prerequisites\" data-renderer-start-pos=\"1\">Prerequisites<\/h1>\n<ul class=\"ak-ul\" data-indent-level=\"1\">\n<li>\n<p data-renderer-start-pos=\"18\"><a class=\"cc-1rn59kg\" title=\"\/wiki\/spaces\/R8P\/pages\/239271937\" href=\"https:\/\/refinery89.com\/de\/docs\/monetize-app-sdk-documentation\/use-manual\/starten-werbeeinnahmen-optimieren\/\" target=\"_blank\" rel=\"noopener\" data-testid=\"link-with-safety\" data-renderer-mark=\"true\">Loslegen<\/a>.<\/p>\n<\/li>\n<li>\n<p data-renderer-start-pos=\"34\">Using RecyclerView<\/p>\n<\/li>\n<\/ul>\n<div class=\"ak-editor-panel cc-tqp4ke sdk-info\" data-panel-type=\"info\">\n<div class=\"ak-editor-panel__content\">\n<p data-renderer-start-pos=\"57\"><strong data-renderer-mark=\"true\">We need you to edit your item Layout, so it has a wrapper\/holder for the Ads. <\/strong>Keep in mind<strong data-renderer-mark=\"true\"> this wrapper\/holder could be expanded or contracted<\/strong>, so make sure your layout adapts to this changes look into adaptive layouts for this, this size changes in the layout will be limited by the ad configurations that the infinite scroll is using, these can be edited in the code on manual initialization, or in our dashboard in case of auto and single tag initialization.<\/p>\n<p>This is because we can not edit your data for adding new items to the adapter, so we take the existing item views and add the ads to them. You can customize which items have ads when you create the configuration for the infinite scroll.<\/p>\n<\/div>\n<\/div>\n<p><\/br><\/p>\n<h1 id=\"Get-the-RecyclerView\" data-renderer-start-pos=\"761\">Get the RecyclerView<\/h1>\n<div class=\"code-block\">\n<pre>      \/\/ Find your view, this is the simplest but there are better ways\r\n      val rv = findViewById&lt;RecyclerView&gt;(R.id.infiniteScroll_recyclerView_manual)\r\n      \r\n      \/\/ Create and use your own adapter\r\n      rv.adapter = &lt;add your adapter&gt;\r\n      \r\n      \/\/ Linear layout is the most common but feel free to swap it\r\n      rv.layoutManager = LinearLayoutManager(this)\r\n<\/pre>\n<\/div>\n<h1 id=\"Prepare-the-Item-View\" data-renderer-start-pos=\"1100\">Prepare the Item View<\/h1>\n<p data-renderer-start-pos=\"1123\">Normal item Code would look something like<\/p>\n<div class=\"code-block\">\n<pre>      &lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n      &lt;androidx.constraintlayout.widget.ConstraintLayout\r\n          xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n          xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n          android:layout_width=\"match_parent\"\r\n          android:layout_height=\"wrap_content\"\r\n          android:layout_marginStart=\"10dp\"\r\n          android:layout_marginEnd=\"10dp\"&gt;\r\n      \r\n          &lt;Button\r\n              android:id=\"@+id\/infinitescroll_item_button_auto\"\r\n              android:layout_width=\"0dp\"\r\n              android:layout_height=\"wrap_content\"\r\n              android:text=\"Button\"\r\n              app:layout_constraintBottom_toBottomOf=\"parent\"\r\n              app:layout_constraintEnd_toEndOf=\"parent\"\r\n              app:layout_constraintStart_toStartOf=\"parent\"\r\n              app:layout_constraintTop_toTopOf=\"parent\"\r\n              app:layout_constraintVertical_bias=\"0.0\" \/&gt;\r\n      \r\n      &lt;\/androidx.constraintlayout.widget.ConstraintLayout&gt;\r\n<\/pre>\n<\/div>\n<p data-renderer-start-pos=\"2033\">For adding the wrapper to this item we would do something like<\/p>\n<div class=\"code-block\">\n<pre>      &lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n      &lt;androidx.constraintlayout.widget.ConstraintLayout\r\n          xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n          xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n          android:layout_width=\"match_parent\"\r\n          android:layout_height=\"wrap_content\"\r\n          android:layout_marginStart=\"10dp\"\r\n          android:layout_marginEnd=\"10dp\"&gt;\r\n      \r\n          &lt;Button\r\n              android:id=\"@+id\/infinitescroll_item_button_auto\"\r\n              android:layout_width=\"0dp\"\r\n              android:layout_height=\"wrap_content\"\r\n              android:text=\"Button\"\r\n              app:layout_constraintBottom_toBottomOf=\"parent\"\r\n              app:layout_constraintEnd_toEndOf=\"parent\"\r\n              app:layout_constraintStart_toStartOf=\"parent\"\r\n              app:layout_constraintTop_toTopOf=\"parent\"\r\n              app:layout_constraintVertical_bias=\"0.0\" \/&gt;\r\n      \r\n          &lt;FrameLayout\r\n              android:layout_width=\"match_parent\"\r\n              android:layout_height=\"match_parent\"\r\n              android:tag=\"infiniteScroll_ad_wrapper_tag\"\r\n              app:layout_constraintBottom_toBottomOf=\"parent\"\r\n              app:layout_constraintEnd_toEndOf=\"parent\"\r\n              app:layout_constraintStart_toStartOf=\"parent\"\r\n              app:layout_constraintTop_toBottomOf=\"@+id\/infinitescroll_item_button_auto\"\r\n              app:layout_constraintVertical_bias=\"0.0\"&gt;\r\n          &lt;\/FrameLayout&gt;\r\n      \r\n      &lt;\/androidx.constraintlayout.widget.ConstraintLayout&gt;\r\n<\/pre>\n<\/div>\n<h1 id=\"Show-the-Ad\" data-renderer-start-pos=\"3432\">Show the Ad<\/h1>\n<div class=\"ak-editor-panel cc-tqp4ke sdk-info\" data-panel-type=\"note\">\n<div class=\"ak-editor-panel__content\">\n<p data-renderer-start-pos=\"3446\">In the example we are using a Test Id.<\/p>\n<p data-renderer-start-pos=\"3487\">If you are not testing the app, change it for the proper ID that you got from us.<\/p>\n<\/div>\n<\/div>\n<p><\/br><\/p>\n<div class=\"code-block\">\n<pre>      # MainActivity.kt\r\n      val infiniteScrollConfigId = ConfigBuilder.INFINITE_SCROLL_TEST_R89_CONFIG_ID\r\n      val itemAdWrapperTag = &lt;Defined ad wrapper tag for each item view that's going to be in the recycler view&gt;\r\n      RefineryAdFactory.createInfiniteScroll(infiniteScrollConfigId, rv, itemAdWrapperTag)\r\n<\/pre>\n<\/div>\n<h1 id=\"Lifecycle-Events\" data-renderer-start-pos=\"3861\">Lifecycle Events<\/h1>\n<p data-renderer-start-pos=\"3879\">You can subscribe to these events with the same method but passing a new object as a parameter. Details about this object can be found in the <a class=\"cc-1rn59kg\" title=\"\/wiki\/spaces\/R8P\/pages\/528842754\" href=\"https:\/\/sdk-reference.refinery89.com\/\" target=\"_blank\" rel=\"noopener\" data-testid=\"link-with-safety\" data-renderer-mark=\"true\">Reference<\/a>.<\/p>\n<div class=\"code-block\">\n<pre>              # MainActivity.kt\r\n              val infiniteScrollConfigId = ConfigBuilder.BANNER_TEST_R89_CONFIG_ID\r\n              val infiniteScrollLifecycleListener = &lt;create the listener with a method or inline&gt;\r\n              RefineryAdFactory.createInfiniteScroll(infiniteScrollConfigId, rv, infiniteScrollLifecycleListener)\r\n<\/pre>\n<\/div>\n<p data-renderer-start-pos=\"4307\">","protected":false},"featured_media":0,"parent":10015,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-10019","docs","type-docs","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Infinite Scroll | Refinery89<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/refinery89.com\/de\/docs\/monetize-app-sdk-documentation\/use-manual\/anzeigenformate\/infinite-scroll\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Infinite Scroll | Refinery89\" \/>\n<meta property=\"og:description\" content=\"Prerequisites Get Started. Using RecyclerView We need you to edit your item Layout, so it has a wrapper\/holder for the Ads. Keep in mind this wrapper\/holder could be expanded or contracted, so make sure your layout adapts to this changes look into adaptive layouts for this, this size changes in the layout will be limited [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/refinery89.com\/de\/docs\/monetize-app-sdk-documentation\/use-manual\/anzeigenformate\/infinite-scroll\/\" \/>\n<meta property=\"og:site_name\" content=\"Refinery89\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Refinery89\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-02T09:45:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@refinery89\" \/>\n<meta name=\"twitter:label1\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/\",\"url\":\"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/\",\"name\":\"Infinite Scroll | Refinery89\",\"isPartOf\":{\"@id\":\"https:\/\/refinery89.com\/#website\"},\"datePublished\":\"2024-06-30T09:42:28+00:00\",\"dateModified\":\"2024-07-02T09:45:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/refinery89.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android &#8211; Monetize App SDK Documentation\",\"item\":\"https:\/\/refinery89.com\/docs\/monetize-app-sdk-documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Private: Use Manual\",\"item\":\"https:\/\/refinery89.com\/?post_type=docs&p=10006\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Ad Formats\",\"item\":\"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Infinite Scroll\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/refinery89.com\/#website\",\"url\":\"https:\/\/refinery89.com\/\",\"name\":\"Refinery89\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/refinery89.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/refinery89.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/refinery89.com\/#organization\",\"name\":\"Refinery89\",\"alternateName\":\"R89\",\"url\":\"https:\/\/refinery89.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/refinery89.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png\",\"contentUrl\":\"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png\",\"width\":200,\"height\":200,\"caption\":\"Refinery89\"},\"image\":{\"@id\":\"https:\/\/refinery89.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Refinery89\/\",\"https:\/\/x.com\/refinery89\",\"https:\/\/www.linkedin.com\/company\/refinery89\/\",\"https:\/\/www.youtube.com\/@refinery89\",\"https:\/\/www.instagram.com\/refinery_89\/\",\"https:\/\/www.reddit.com\/user\/Refinery89\/\",\"https:\/\/share.google\/K8hFf3ktmUrTi1XCa\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Infinite Scroll | Refinery89","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/refinery89.com\/de\/docs\/monetize-app-sdk-documentation\/use-manual\/anzeigenformate\/infinite-scroll\/","og_locale":"de_DE","og_type":"article","og_title":"Infinite Scroll | Refinery89","og_description":"Prerequisites Get Started. Using RecyclerView We need you to edit your item Layout, so it has a wrapper\/holder for the Ads. Keep in mind this wrapper\/holder could be expanded or contracted, so make sure your layout adapts to this changes look into adaptive layouts for this, this size changes in the layout will be limited [&hellip;]","og_url":"https:\/\/refinery89.com\/de\/docs\/monetize-app-sdk-documentation\/use-manual\/anzeigenformate\/infinite-scroll\/","og_site_name":"Refinery89","article_publisher":"https:\/\/www.facebook.com\/Refinery89\/","article_modified_time":"2024-07-02T09:45:48+00:00","og_image":[{"width":200,"height":200,"url":"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@refinery89","twitter_misc":{"Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/","url":"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/","name":"Infinite Scroll | Refinery89","isPartOf":{"@id":"https:\/\/refinery89.com\/#website"},"datePublished":"2024-06-30T09:42:28+00:00","dateModified":"2024-07-02T09:45:48+00:00","breadcrumb":{"@id":"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/infinite-scroll\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/refinery89.com\/"},{"@type":"ListItem","position":2,"name":"Android &#8211; Monetize App SDK Documentation","item":"https:\/\/refinery89.com\/docs\/monetize-app-sdk-documentation\/"},{"@type":"ListItem","position":3,"name":"Private: Use Manual","item":"https:\/\/refinery89.com\/?post_type=docs&p=10006"},{"@type":"ListItem","position":4,"name":"Ad Formats","item":"https:\/\/refinery89.com\/it\/docs\/monetize-app-sdk-documentation\/use-manual\/formati-pubblicitari\/"},{"@type":"ListItem","position":5,"name":"Infinite Scroll"}]},{"@type":"WebSite","@id":"https:\/\/refinery89.com\/#website","url":"https:\/\/refinery89.com\/","name":"Refinery89","description":"","publisher":{"@id":"https:\/\/refinery89.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/refinery89.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/refinery89.com\/#organization","name":"Refinery89","alternateName":"R89","url":"https:\/\/refinery89.com\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/refinery89.com\/#\/schema\/logo\/image\/","url":"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png","contentUrl":"https:\/\/refinery89.com\/wp-content\/uploads\/2025\/08\/r89-thumbnail.png","width":200,"height":200,"caption":"Refinery89"},"image":{"@id":"https:\/\/refinery89.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Refinery89\/","https:\/\/x.com\/refinery89","https:\/\/www.linkedin.com\/company\/refinery89\/","https:\/\/www.youtube.com\/@refinery89","https:\/\/www.instagram.com\/refinery_89\/","https:\/\/www.reddit.com\/user\/Refinery89\/","https:\/\/share.google\/K8hFf3ktmUrTi1XCa"]}]}},"comment_count":0,"_links":{"self":[{"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/docs\/10019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/comments?post=10019"}],"version-history":[{"count":0,"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/docs\/10019\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/docs\/10015"}],"prev":[{"title":"Interstitial","link":"https:\/\/refinery89.com\/de\/docs\/monetize-app-sdk-documentation\/use-manual\/ad-formats\/interstitial\/","href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/docs\/10018"}],"wp:attachment":[{"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/media?parent=10019"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/refinery89.com\/de\/wp-json\/wp\/v2\/doc_tag?post=10019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}