public class AmpFitText extends AmpComponent
Expands or shrinks its font size to fit the content within the space given to it.
| Constructor and Description |
|---|
AmpFitText(String value)
Creates instance of AmpFitText.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxFontSize()
Specifies the maximum font size as an integer that the amp-fit-text can use.
|
int |
getMinFontSize()
Specifies the minimum font size as an integer that the amp-fit-text can use.
|
String |
getRequiredScript()
Required script that muct be added to head section.
|
String |
getValue()
Text Value of component.
|
void |
setMaxFontSize(int value)
Specifies the maximum font size as an integer that the amp-fit-text can use.
|
void |
setMinFontSize(int value)
Specifies the minimum font size as an integer that the amp-fit-text can use.
|
void |
setValue(String value)
Text Value of component.
|
String |
toAmpHtml()
Represents amp html version of component.
|
String |
toHtml()
Represents html version of component.
|
getAttributes, getFallback, getPlaceholder, setFallback, setPlaceholderpublic AmpFitText(String value)
Creates instance of AmpFitText.
value - public final String getValue()
Text Value of component.
public final void setValue(String value)
Text Value of component.
public final int getMinFontSize()
Specifies the minimum font size as an integer that the amp-fit-text can use.
public final void setMinFontSize(int value)
Specifies the minimum font size as an integer that the amp-fit-text can use.
public final int getMaxFontSize()
Specifies the maximum font size as an integer that the amp-fit-text can use.
public final void setMaxFontSize(int value)
Specifies the maximum font size as an integer that the amp-fit-text can use.
public String getRequiredScript()
Required script that muct be added to head section.
getRequiredScript in class AmpComponentpublic String toAmpHtml()
Represents amp html version of component.
toAmpHtml in class AmpComponentpublic String toHtml()
Represents html version of component.
toHtml in class AmpComponentCopyright (c) 2008-2024 Aspose Pty Ltd. All Rights Reserved.