# DefaultOffsettingHelper

Summary:[Ctors](https://developer.android.com/reference/android/support/wearable/view/DefaultOffsettingHelper#pubctors)\|[Methods](https://developer.android.com/reference/android/support/wearable/view/DefaultOffsettingHelper#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/wearable/view/DefaultOffsettingHelper#inhmethods)  

# DefaultOffsettingHelper

`
public


class
DefaultOffsettingHelper
`  
`


``

extends `[WearableRecyclerView.OffsettingHelper](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.OffsettingHelper.html)`


``


`

|---|---|-------------------------------------------------------|
| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.support.wearable.view.WearableRecyclerView.OffsettingHelper](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.OffsettingHelper.html) ||
|   | ↳ | android.support.wearable.view.DefaultOffsettingHelper |

<br />

*** ** * ** ***

<br />

**This class is deprecated.**   
use the`androidx.wear.widget.WearableRecyclerView`and associated classes provided by the[Jetpack Wear](https://developer.android.com/jetpack/androidx/releases/wear)library instead.

This implementation of[WearableRecyclerView.OffsettingHelper](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.OffsettingHelper.html)provides basic offsetting logic for updating child layout. For round devices it offsets the children horizontally to make them appear to travel around a circle. For square devices it aligns them in a straight list.

## Summary

|                                                                      ### Public constructors                                                                       ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[DefaultOffsettingHelper](https://developer.android.com/reference/android/support/wearable/view/DefaultOffsettingHelper.html#DefaultOffsettingHelper())`() ` |

|                                                                                                                                                                                                                                                                          ### Public methods                                                                                                                                                                                                                                                                           ||
|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[adjustAnchorOffsetXY](https://developer.android.com/reference/android/support/wearable/view/DefaultOffsettingHelper.html#adjustAnchorOffsetXY(android.view.View,%20float[]))`(`[View](http://developer.android.com/reference/android/view/View.html)` child, float[] anchorOffsetXY) ` Override this method if you wish to adjust the anchor coordinates for each child view during a layout pass.                                                                                                                                                       |
| ` void` | ` `[updateChild](https://developer.android.com/reference/android/support/wearable/view/DefaultOffsettingHelper.html#updateChild(android.view.View,%20android.support.wearable.view.WearableRecyclerView))`(`[View](http://developer.android.com/reference/android/view/View.html)` child, `[WearableRecyclerView](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.html)` parent) ` The default implementation will lay out children along a curve for round screens and along a straight line for square screens. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[android.support.wearable.view.WearableRecyclerView.OffsettingHelper](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.OffsettingHelper.html)` ` |------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void` | ` `[updateChild](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.OffsettingHelper.html#updateChild(android.view.View,%20android.support.wearable.view.WearableRecyclerView))`(`[View](http://developer.android.com/reference/android/view/View.html)` child, `[WearableRecyclerView](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.html)` parent) ` Override this method if you wish to implement custom child layout behavior on scroll. | ||
| 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() `                                                                                | ||

## Public constructors

### DefaultOffsettingHelper

```
public DefaultOffsettingHelper ()
```

<br />

<br />

## Public methods

### adjustAnchorOffsetXY

```
public void adjustAnchorOffsetXY (View child, 
                float[] anchorOffsetXY)
```

Override this method if you wish to adjust the anchor coordinates for each child view during a layout pass. In the override set the new desired anchor coordinates in the provided array. The coordinates should be provided in relation to the child view.

<br />

|                                                                                                         Parameters                                                                                                         ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `child`          | `View`: The child view to which the anchor coordinates will apply. <br />                                                                                                                                |
| `anchorOffsetXY` | `float`: The anchor coordinates for the provided child view, by default set to a pre-defined constant on the horizontal axis and half of the child height on the vertical axis (vertical center). <br /> |

### updateChild

```
public void updateChild (View child, 
                WearableRecyclerView parent)
```

The default implementation will lay out children along a curve for round screens and along a straight line for square screens.

<br />

|                                                                                                 Parameters                                                                                                 ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `child`  | `View`: the current child to be affected. <br />                                                                                                                                                 |
| `parent` | `WearableRecyclerView`: the[WearableRecyclerView](https://developer.android.com/reference/android/support/wearable/view/WearableRecyclerView.html)parent that this helper is attached to. <br /> |