GridPageOptions
public
interface
GridPageOptions
android.support.wearable.view.GridPageOptions
|
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
and a RecyclerView
instead.
An optional interface for a Fragment within a GridViewPager which provides additional
configurable options.
Summary
Nested classes |
interface |
GridPageOptions.BackgroundListener
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 and a RecyclerView instead.
|
Public methods
getBackground
public abstract Drawable getBackground ()
Provides a background for the page represented by this Fragment. A return value of GridPagerAdapter.BACKGROUND_NONE
will default to the background for the row, if supplied.
setBackgroundListener
public abstract void setBackgroundListener (GridPageOptions.BackgroundListener listener)
Provides a listener used to notify the container about a change to the background.
Parameters |
listener |
GridPageOptions.BackgroundListener : a listener used to notify about background changes
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# GridPageOptions\n===============\n\n\n`\npublic\n\n\ninterface\nGridPageOptions\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------|\n| android.support.wearable.view.GridPageOptions |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface is deprecated.** \n\nstarting with Android Wear 2.0 we no longer encourage bi-directional spacial models\nfor apps. If you are looking to implement vertical paging pattern, consider using the [SnapHelper](../../../../../reference/android/support/v7/widget/SnapHelper.html) and a [RecyclerView](../../../../../reference/android/support/v7/widget/RecyclerView.html)\ninstead.\n\nAn optional interface for a Fragment within a GridViewPager which provides additional\nconfigurable options.\n\nSummary\n-------\n\n| ### Nested classes ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` interface` | [GridPageOptions.BackgroundListener](../../../../../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](../../../../../reference/android/support/v7/widget/SnapHelper.html) and a [RecyclerView](../../../../../reference/android/support/v7/widget/RecyclerView.html) instead.* |\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[Drawable](http://developer.android.com/reference/android/graphics/drawable/Drawable.html) | ` `[getBackground](../../../../../reference/android/support/wearable/view/GridPageOptions.html#getBackground())`() ` Provides a background for the page represented by this Fragment. |\n| ` abstract void` | ` `[setBackgroundListener](../../../../../reference/android/support/wearable/view/GridPageOptions.html#setBackgroundListener(android.support.wearable.view.GridPageOptions.BackgroundListener))`(`[GridPageOptions.BackgroundListener](../../../../../reference/android/support/wearable/view/GridPageOptions.BackgroundListener.html)` listener) ` Provides a listener used to notify the container about a change to the background. |\n\nPublic methods\n--------------\n\n### getBackground\n\n```\npublic abstract Drawable getBackground ()\n```\n\nProvides a background for the page represented by this Fragment. A return value of [GridPagerAdapter.BACKGROUND_NONE](../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#BACKGROUND_NONE) will default to the background for the row, if supplied.\n\n\u003cbr /\u003e\n\n| Returns ||\n|--------------------------------------------------------------------------------------------|--------|\n| [Drawable](http://developer.android.com/reference/android/graphics/drawable/Drawable.html) | \u003cbr /\u003e |\n\n**See also:**\n\n- [GridPagerAdapter.getBackgroundForRow(int)](../../../../../reference/android/support/wearable/view/GridPagerAdapter.html#getBackgroundForRow(int)) \n\n### setBackgroundListener\n\n```\npublic abstract void setBackgroundListener (GridPageOptions.BackgroundListener listener)\n```\n\nProvides a listener used to notify the container about a change to the background.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|-------------------------------------------------------------------------------------------------|\n| `listener` | `GridPageOptions.BackgroundListener`: a listener used to notify about background changes \u003cbr /\u003e |"]]