---
updatedAt: 2026-08-03T07:46:15.000Z
agentTools:
  projectIndex: https://developers.taboola.com/taboolasdk/llms.txt
---

# Advanced Options

*Android Classic* - Advanced Options

> ✅ Sample App
>
> While reading the documentation, take a look at our <a href="https://github.com/taboola/android-sdk-examples-4x" target="_blank">Sample App</a>.

## Introduction

In this section, we look at more advanced options for working with the **Taboola SDK**.

## Multiple Taboola Units on 1 page

*By default*, if a given screen/page contains multiple Taboola **Units**, each **Unit** loads *sequentially*, with a preset timeout value. This flow enables Taboola to prevent duplicate content across **Units**.

You can customize this default behavior at the **Page** level - as described below.

### Custom timeout for serial loading

During serial loading, Taboola SDK loads each Unit sequentially: *as soon as* a given Unit has loaded, the next one starts loading.

A default *timeout* of 10,000 ms is applied. If a given Unit has not loaded within that time, Taboola SDK will move onto the next one.

To adjust this timeout value, invoke  the `setSerialFetchTimeout` method at the **Page** level.

After initializing `TBLClassicPage`:

```java
tblClassicPage.setSerialFetchTimeout(2000);
```
```kotlin
tblClassicPage.setSerialFetchTimeout(2000)
```

### Parallel loading

By default, Taboola SDK uses *serial* loading. To load units in *parallel*, set the `setFetchPolicy` *extra property* at the **Page** level:

<Callout icon="🚧" theme="warn">
  When loading **Units** _in parallel_, Taboola _cannot_ guarantee unique content across **Units**.
</Callout>

After initializing `TBLClassicPage`:

```java
HashMap<String, String> extraProperties = new HashMap<>();
extraProperties.put("setFetchPolicy", "1");
tblClassicPage.setPageExtraProperties(extraProperties);
```
```kotlin
val extraProperties = hashMapOf("setFetchPolicy" to "1")
tblClassicPage.setPageExtraProperties(extraProperties)
```

> 📘 Possible values:
>
> * `"0"` - *serial* loading of Units (*default*).
> * `"1"` - *parallel* loading of Units.

<Callout icon="🚧" theme="warn">
  Pass the param value as a String.
</Callout>

## Same placement across multiple screens

If you need to detach a Unit and re-attach it to a different section of your UI, invoke the `setPageUrl()` method on the new **Unit** instance.

## Horizontal Scrolling

Taboola SDK supports apps with horizontal navigation between screens.

To enable horizontal navigation,  activate the `enableHorizontalScroll` flag. This allows the Feed to intercept horizontal scroll gestures and navigate between screens.

```java
// Define a map with extra properties
HashMap<String, String> extraProperties = new HashMap<String, String>() {{ put("enableHorizontalScroll", "true"); }};

// Set the extra properties in the Unit 
tblClassicUnit.setUnitExtraProperties(extraProperties);
```
```kotlin
// Define a map with extra properties
val extraProperties = hashMapOf("enableHorizontalScroll" to "true")

// Set the extra properties in the Unit 
tblClassicUnit.setUnitExtraProperties(extraProperties)
```

<Callout icon="📘" theme="info">
  By default, `enableHorizontalScroll` is turned _off_.
</Callout>

## Working with ViewPager

1. In your Activity, add the following code to the `OnCreate` method:

```java
public class MyClass {

    private TBLClassicPaqe classicPage;

    @Override
    public View onCreate(Bundle savedInstanceState) {
        classicPage = Taboola.getClassicPage(<pageUrl>, <pageType>);
    }

}
```
```kotlin
class MyClass {

    private lateinit var classicPage: TBLClassicPage

    override fun onCreate(savedInstanceState: Bundle?): View {
        classicPage = Taboola.getClassicPage(<pageUrl>, <pageType>)
    }
}
```

2. In each Fragment, add the following code to the `onCreateView` method:

```java
@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    TBLClassicUnit tblClassicUnit = mClassicPage.build(<Context>, <placementName>, <mode>, <placementType>, new TBLClassicListener() {...});
    tblClassicUnit.fetchContent();
}
```
```kotlin
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
    val tblClassicUnit = classicPage.build(<Context>, <placementName>, <mode>, <placementType>, object : TBLClassicListener() {
        // ... listener implementation
    })
    tblClassicUnit.fetchContent()
    
    return inflater.inflate(R.layout.your_layout, container, false)
}
```

## Dark Mode

> 🚧 Configuring Dark Mode
>
> Dark mode is **not** supported by default. To configure your placements for dark mode, contact your **Taboola Account Manager**.

Once **Taboola** has configured your placements for dark mode, you can use the following code in your application:

```java
// Define a map with extra properties:
HashMap<String, String> extraProperties = new HashMap<String, String>() {{ put("darkMode", "true"); }};

// Set the extra properties within the Unit instance:
tblClassicUnit.setUnitExtraProperties(extraProperties);
```
```kotlin
// Define a map with extra properties:
val extraProperties = hashMapOf("darkMode" to "true")

// Set the extra properties within the Unit instance:
tblClassicUnit.setUnitExtraProperties(extraProperties)
```

> 🚧 Swapping Between Dark & Light Themes
>
> Setting extraProperties with "darkMode" "true" will send a request for "dark" content.
> For light content do not set the extra Property and **avoid using ("darkMode", "false")**

<Callout icon="💁🏻" theme="default">
  ### Need a hand?

  Go ahead! Ask a question in our [Support Forum](https://sdk.taboola.com/taboolasdk/discuss).

  **Tip**: Provide as much detail as possible, including your platform and SDK version.
</Callout>