public class ButtonsLayoutTemplate extends LayoutTemplate
| Constructor and Description |
|---|
ButtonsLayoutTemplate(java.lang.String text,
java.util.List<ClickActionForTemplateMessage> actions)
Constructor to create ButtonsLayoutTemplate
|
| Modifier and Type | Method and Description |
|---|---|
void |
setDefaultAction(ClickActionForTemplateMessage defaultAction)
Set default action for button
|
void |
setImageAspectRatio(ImageAspectRatio imageAspectRatio)
Set image aspect ratio.
|
void |
setImageBackgroundColor(int imageBackgroundColor)
Set image background color.
|
void |
setImageScaleType(com.linecorp.linesdk.message.template.ImageScaleType imageScaleType)
Set image scale type.
|
void |
setMessageSender(MessageSender messageSender)
Set message sender
|
void |
setThumbnailImageUrl(java.lang.String thumbnailImageUrl)
Set thumbnail image url.
|
void |
setTitle(java.lang.String title)
Set button title.
|
JSONObject |
toJsonObject() |
public ButtonsLayoutTemplate(@NonNull
java.lang.String text,
@NonNull
java.util.List<ClickActionForTemplateMessage> actions)
text - description for the buttonactions - a list of actions for the buttonpublic void setThumbnailImageUrl(@Nullable
java.lang.String thumbnailImageUrl)
thumbnailImageUrl - public void setImageAspectRatio(@NonNull
ImageAspectRatio imageAspectRatio)
imageAspectRatio - available values are rectangle (1.51:1) and square (1:1)public void setImageScaleType(@NonNull
com.linecorp.linesdk.message.template.ImageScaleType imageScaleType)
imageScaleType - public void setImageBackgroundColor(int imageBackgroundColor)
imageBackgroundColor - public void setTitle(@Nullable
java.lang.String title)
title - public void setDefaultAction(@Nullable
ClickActionForTemplateMessage defaultAction)
defaultAction - public void setMessageSender(@Nullable
MessageSender messageSender)
messageSender - @NonNull
public JSONObject toJsonObject()
throws JSONException
toJsonObject in interface JsonabletoJsonObject in class LayoutTemplateJSONException