public static class ReplyKeyboardMarkup.Builder
extends java.lang.Object
ReplyKeyboardMarkup markup = new ReplyKeyboardMarkup.Builder()
.row("A", "B", "C")
.row("D")
.row("E", "F")
.build();
| Constructor and Description |
|---|
ReplyKeyboardMarkup.Builder() |
| Modifier and Type | Method and Description |
|---|---|
ReplyKeyboardMarkup.Builder |
add(int width,
java.lang.String... buttons)
Adds all
buttons with a maximum width per row. |
ReplyKeyboardMarkup |
build()
Builds the
ReplyKeyboardMarkup object. |
ReplyKeyboardMarkup.Builder |
row(java.lang.String... buttons)
Adds a row of "buttons" to the keyboard.
|
ReplyKeyboardMarkup.Builder |
setOneTimeKeyboard()
Requests clients to hide the keyboard as soon as it's been used.
|
ReplyKeyboardMarkup.Builder |
setResizeKeyboard()
Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons).
|
ReplyKeyboardMarkup.Builder |
setSelective()
Use this parameter if you want to show the keyboard to specific users only.
|
public ReplyKeyboardMarkup.Builder row(java.lang.String... buttons)
buttons - the row of buttons, represented as a String array.public ReplyKeyboardMarkup.Builder add(int width, java.lang.String... buttons)
buttons with a maximum width per row.width - The maximum amount of buttons per row.buttons - The buttons to add.public ReplyKeyboardMarkup.Builder setResizeKeyboard()
public ReplyKeyboardMarkup.Builder setOneTimeKeyboard()
public ReplyKeyboardMarkup.Builder setSelective()
public ReplyKeyboardMarkup build()
ReplyKeyboardMarkup object.ReplyKeyboardMarkup