public class AmpAccordion extends AmpComponent
A UI element that facilitates showing/hiding different sections.
Constructor and Description |
---|
AmpAccordion() |
Modifier and Type | Method and Description |
---|---|
boolean |
getDisableSessionStates()
Set this attribute on the amp-accordion to opt out of preserving the collapsed/expanded state of the accordion.
|
boolean |
getExpandSingleSection()
Set this attribute on the amp-accordion to only allow one section to be expanded at a time.
|
String |
getRequiredScript()
Required script that muct be added to head section.
|
List<Section> |
getSections()
List of sections.
|
void |
setDisableSessionStates(boolean value)
Set this attribute on the amp-accordion to opt out of preserving the collapsed/expanded state of the accordion.
|
void |
setExpandSingleSection(boolean value)
Set this attribute on the amp-accordion to only allow one section to be expanded at a time.
|
String |
toAmpHtml()
Represents amp html version of component.
|
String |
toHtml()
Represents html version of component.
|
getAttributes, getFallback, getPlaceholder, setFallback, setPlaceholder
public final boolean getDisableSessionStates()
Set this attribute on the amp-accordion to opt out of preserving the collapsed/expanded state of the accordion.
public final void setDisableSessionStates(boolean value)
Set this attribute on the amp-accordion to opt out of preserving the collapsed/expanded state of the accordion.
public final boolean getExpandSingleSection()
Set this attribute on the amp-accordion to only allow one section to be expanded at a time.
public final void setExpandSingleSection(boolean value)
Set this attribute on the amp-accordion to only allow one section to be expanded at a time.
public String getRequiredScript()
Required script that muct be added to head section.
getRequiredScript
in class AmpComponent
public String toAmpHtml()
Represents amp html version of component.
toAmpHtml
in class AmpComponent
public String toHtml()
Represents html version of component.
toHtml
in class AmpComponent