# GridPageOptions

# GridPageOptions

`
public


interface
GridPageOptions
`  
`


`

|-----------------------------------------------|
| android.support.wearable.view.GridPageOptions |

<br />

*** ** * ** ***

<br />

**This interface is deprecated.**   
starting with Android Wear 2.0 we no longer encourage bi-directional spacial models for apps. If you are looking to implement vertical paging pattern, consider using the[SnapHelper](https://developer.android.com/reference/android/support/v7/widget/SnapHelper.html)and a[RecyclerView](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html)instead.

An optional interface for a Fragment within a GridViewPager which provides additional configurable options.

## Summary

|                                                                                                                                                                                                                                                                                     ### Nested classes                                                                                                                                                                                                                                                                                     ||
|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` interface` | [GridPageOptions.BackgroundListener](https://developer.android.com/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html) *This interface is deprecated. starting with Android Wear 2.0 we no longer encourage bi-directional spacial models for apps. If you are looking to implement vertical paging pattern, consider using the[SnapHelper](https://developer.android.com/reference/android/support/v7/widget/SnapHelper.html)and a[RecyclerView](https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html)instead.* |

|                                                                                                                                                                                                                                                                              ### Public methods                                                                                                                                                                                                                                                                              ||
|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[Drawable](http://developer.android.com/reference/android/graphics/drawable/Drawable.html) | ` `[getBackground](https://developer.android.com/reference/android/support/wearable/view/GridPageOptions.html#getBackground())`() ` Provides a background for the page represented by this Fragment.                                                                                                                                                                                                                                                                 |
| ` abstract void`                                                                                       | ` `[setBackgroundListener](https://developer.android.com/reference/android/support/wearable/view/GridPageOptions.html#setBackgroundListener(android.support.wearable.view.GridPageOptions.BackgroundListener))`(`[GridPageOptions.BackgroundListener](https://developer.android.com/reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html)` listener) ` Provides a listener used to notify the container about a change to the background. |

## Public methods

### getBackground

```
public abstract Drawable getBackground ()
```

Provides a background for the page represented by this Fragment. A return value of[GridPagerAdapter.BACKGROUND_NONE](https://developer.android.com/reference/android/support/wearable/view/GridPagerAdapter.html#BACKGROUND_NONE)will default to the background for the row, if supplied.

<br />

|                                              Returns                                               ||
|--------------------------------------------------------------------------------------------|--------|
| [Drawable](http://developer.android.com/reference/android/graphics/drawable/Drawable.html) | <br /> |

**See also:**

- [GridPagerAdapter.getBackgroundForRow(int)](https://developer.android.com/reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int))  

### setBackgroundListener

```
public abstract void setBackgroundListener (GridPageOptions.BackgroundListener listener)
```

Provides a listener used to notify the container about a change to the background.

<br />

|                                                 Parameters                                                  ||
|------------|-------------------------------------------------------------------------------------------------|
| `listener` | `GridPageOptions.BackgroundListener`: a listener used to notify about background changes <br /> |