# RowsSupportFragment.MainFragmentAdapter

Artifact: [androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/app/RowsSupportFragment.java+class:androidx.leanback.app.RowsSupportFragment.MainFragmentAdapter) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***


```
class RowsSupportFragment.MainFragmentAdapter : BrowseSupportFragment.MainFragmentAdapter<RowsSupportFragment!>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.leanback.app.BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter)\<[RowsSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment)!\> ||
|   | ↳ | [androidx.leanback.app.RowsSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter) |

*** ** * ** ***

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#MainFragmentAdapter(androidx.leanback.app.RowsSupportFragment)(fragment: https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment!)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#isScrolling()()` Returns whether its scrolling. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#onTransitionEnd()()` Callback indicating transition end. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#onTransitionPrepare()()` Callback indicating transition prepare start. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#onTransitionStart()()` Callback indicating transition start. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#setAlignment(int)(windowAlignOffsetFromTop: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the window alignment and also the pivots for scale operation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#setEntranceTransitionState(boolean)(state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` For rows that willing to participate entrance transition, this function hide views if afterTransition is true, show views if afterTransition is false. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/app/RowsSupportFragment.MainFragmentAdapter#setExpand(boolean)(expand: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Set the visibility of titles/hover card of browse rows. |

### Inherited functions

From [androidx.leanback.app.BrowseSupportFragment.MainFragmentAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter) `T!` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter#getFragment()()` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.FragmentHost!` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter#getFragmentHost()()`

Returns the current host interface so that main fragment can interact with `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter#isScalingEnabled()()`

Returns whether row scaling is enabled.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/leanback/app/BrowseSupportFragment.MainFragmentAdapter#setScalingEnabled(boolean)(scalingEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Sets the row scaling property.

## Public constructors

### MainFragmentAdapter

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

```
MainFragmentAdapter(fragment: RowsSupportFragment!)
```

## Public functions

### isScrolling

```
fun isScrolling(): Boolean
```

Returns whether its scrolling.

### onTransitionEnd

```
fun onTransitionEnd(): Unit
```

Callback indicating transition end.

### onTransitionPrepare

```
fun onTransitionPrepare(): Boolean
```

Callback indicating transition prepare start.

### onTransitionStart

```
fun onTransitionStart(): Unit
```

Callback indicating transition start.

### setAlignment

```
fun setAlignment(windowAlignOffsetFromTop: Int): Unit
```

Sets the window alignment and also the pivots for scale operation.

### setEntranceTransitionState

```
fun setEntranceTransitionState(state: Boolean): Unit
```

For rows that willing to participate entrance transition, this function hide views if afterTransition is true, show views if afterTransition is false.

### setExpand

```
fun setExpand(expand: Boolean): Unit
```

Set the visibility of titles/hover card of browse rows.