# GridViewPager.LayoutParams

Summary:[Inherited Constants](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams#inhconstants)\|[Fields](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams#lfields)\|[Inherited Fields](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams#inhfields)\|[Ctors](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams#pubctors)\|[Inherited Methods](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams#inhmethods)  

# GridViewPager.LayoutParams

`
public
static


class
GridViewPager.LayoutParams
`  
`


``


``

extends `[ViewGroup.MarginLayoutParams](http://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)`


``


`

|---|---|---|----------------------------------------------------------|
| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [android.view.ViewGroup.LayoutParams](http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |||
|   | ↳ | [android.view.ViewGroup.MarginLayoutParams](http://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) ||
|   |   | ↳ | android.support.wearable.view.GridViewPager.LayoutParams |

<br />

*** ** * ** ***

<br />

**This class 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.

Layout parameters that should be supplied for views added to a ViewPager.

## Summary

|                                                                                 ### Inherited constants                                                                                 |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From class`android.view.ViewGroup.LayoutParams` |-------|-----------------------| | `int` | `FILL_PARENT` <br />  | | `int` | `MATCH_PARENT` <br /> | | `int` | `WRAP_CONTENT` <br /> | |

|                                                                                                                                                          ### Fields                                                                                                                                                          ||
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public int`     | [gravity](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams.html#gravity) Where to position the view page within the overall GridViewPager container; constants are defined in[Gravity](http://developer.android.com/reference/android/view/Gravity.html). |
| ` public boolean` | [needsMeasure](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams.html#needsMeasure) <br />                                                                                                                                                                 |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                        ### Inherited fields                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From class`android.view.ViewGroup.MarginLayoutParams` |---------------|-----------------------| | ` public int` | `bottomMargin` <br /> | | ` public int` | `leftMargin` <br />   | | ` public int` | `rightMargin` <br />  | | ` public int` | `topMargin` <br />    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| From class`android.view.ViewGroup.LayoutParams` |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------| | ` public int`                                                                                                                                                               | `height` <br />                    | | ` public `[LayoutAnimationController.AnimationParameters](http://developer.android.com/reference/android/view/animation/LayoutAnimationController.AnimationParameters.html) | `layoutAnimationParameters` <br /> | | ` public int`                                                                                                                                                               | `width` <br />                     | |

|                                                                                                                                                                                  ### Public constructors                                                                                                                                                                                   ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[LayoutParams](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams.html#LayoutParams())`() `                                                                                                                                                                                                                                            |
| ` `[LayoutParams](https://developer.android.com/reference/android/support/wearable/view/GridViewPager.LayoutParams.html#LayoutParams(android.content.Context,%20android.util.AttributeSet))`(`[Context](http://developer.android.com/reference/android/content/Context.html)` context, `[AttributeSet](http://developer.android.com/reference/android/util/AttributeSet.html)` attrs) ` |

| ### Inherited methods |
|-----------------------|---|
| From class` `[android.view.ViewGroup.MarginLayoutParams](http://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)` ` |------------|--------------------------------------------------------| | ` int`     | ` getLayoutDirection() `                               | | ` int`     | ` getMarginEnd() `                                     | | ` int`     | ` getMarginStart() `                                   | | ` boolean` | ` isMarginRelative() `                                 | | ` void`    | ` resolveLayoutDirection(int arg0) `                   | | ` void`    | ` setLayoutDirection(int arg0) `                       | | ` void`    | ` setMarginEnd(int arg0) `                             | | ` void`    | ` setMarginStart(int arg0) `                           | | ` void`    | ` setMargins(int arg0, int arg1, int arg2, int arg3) ` | ||
| From class` `[android.view.ViewGroup.LayoutParams](http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)` ` |---------|--------------------------------------------------------------------------------------------------------------------------------------------| | ` void` | ` resolveLayoutDirection(int arg0) `                                                                                                       | | ` void` | ` setBaseAttributes(`[TypedArray](http://developer.android.com/reference/android/content/res/TypedArray.html)` arg0, int arg1, int arg2) ` | ||
| From class` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                               | | ` boolean`                                                                         | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                            | ` finalize() `                                                                            | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                            | | ` int`                                                                             | ` hashCode() `                                                                            | | ` final void`                                                                      | ` notify() `                                                                              | | ` final void`                                                                      | ` notifyAll() `                                                                           | | ` `[String](http://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                            | | ` final void`                                                                      | ` wait(long arg0, int arg1) `                                                             | | ` final void`                                                                      | ` wait(long arg0) `                                                                       | | ` final void`                                                                      | ` wait() `                                                                                | ||

## Fields

### gravity

```
public int gravity
```

Where to position the view page within the overall GridViewPager container; constants are defined in[Gravity](http://developer.android.com/reference/android/view/Gravity.html).

<br />

### needsMeasure

```
public boolean needsMeasure
```

<br />

<br />

## Public constructors

### LayoutParams

```
public LayoutParams ()
```

<br />

<br />

### LayoutParams

```
public LayoutParams (Context context, 
                AttributeSet attrs)
```

<br />

<br />

|            Parameters            ||
|-----------|-----------------------|
| `context` | `Context` <br />      |
| `attrs`   | `AttributeSet` <br /> |