Stay organized with collections
Save and categorize content based on your preferences.
HeroCarouselStrategy
public
class
HeroCarouselStrategy
extends CarouselStrategy
A CarouselStrategy
that knows how to size and fit one large item and one small item into
a container to create a layout to browse one 'hero' item at a time with a preview item.
Note that this strategy resizes Carousel items to take up the full width or height of the
Carousel, save room for the small item.
This class will automatically be reversed by CarouselLayoutManager
if being laid out
right-to-left and does not need to make any account for layout direction itself.
For more information, see the component
developer guidance and design
guidelines.
Summary
Inherited methods |
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
HeroCarouselStrategy
public HeroCarouselStrategy ()
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,["# HeroCarouselStrategy\n\nSummary: [Ctors](#pubctors) \\| [Inherited Methods](#inhmethods) \n\nHeroCarouselStrategy\n====================\n\n\n`\npublic\n\n\nclass\nHeroCarouselStrategy\n`\n\n\n`\n\n\n`\n\n`\n\nextends `[CarouselStrategy](/reference/com/google/android/material/carousel/CarouselStrategy)`\n\n\n`\n\n`\n\n\n`\n\n|---|---|-----------------------------------------------------------|\n| java.lang.Object |||\n| ↳ | [com.google.android.material.carousel.CarouselStrategy](/reference/com/google/android/material/carousel/CarouselStrategy) ||\n| | ↳ | com.google.android.material.carousel.HeroCarouselStrategy |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA [CarouselStrategy](/reference/com/google/android/material/carousel/CarouselStrategy) that knows how to size and fit one large item and one small item into\na container to create a layout to browse one 'hero' item at a time with a preview item.\n\nNote that this strategy resizes Carousel items to take up the full width or height of the\nCarousel, save room for the small item.\n\nThis class will automatically be reversed by [CarouselLayoutManager](/reference/com/google/android/material/carousel/CarouselLayoutManager) if being laid out\nright-to-left and does not need to make any account for layout direction itself.\n\nFor more information, see the [component\ndeveloper guidance](https://github.com/material-components/material-components-android/blob/master/docs/components/Carousel.md) and [design\nguidelines](https://material.io/components/carousel/overview).\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[HeroCarouselStrategy](/reference/com/google/android/material/carousel/HeroCarouselStrategy#HeroCarouselStrategy())`() ` |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[com.google.android.material.carousel.CarouselStrategy](/reference/com/google/android/material/carousel/CarouselStrategy)` ` |----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` float` | ` `[getSmallItemSizeMax](/reference/com/google/android/material/carousel/CarouselStrategy#getSmallItemSizeMax())`() ` Returns the maximum small item size value. | | ` float` | ` `[getSmallItemSizeMin](/reference/com/google/android/material/carousel/CarouselStrategy#getSmallItemSizeMin())`() ` Returns the minimum small item size value. | | ` void` | ` `[setSmallItemSizeMax](/reference/com/google/android/material/carousel/CarouselStrategy#setSmallItemSizeMax(float))`(float maxSmallItemSize) ` Sets the maximum size for the small items. | | ` void` | ` `[setSmallItemSizeMin](/reference/com/google/android/material/carousel/CarouselStrategy#setSmallItemSizeMin(float))`(float minSmallItemSize) ` Sets the minimum size for the small items. | ||\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### HeroCarouselStrategy\n\n```\npublic HeroCarouselStrategy ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]