public static class ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder |
addRow(KeyboardButton... buttons)
*Optional*
Add a new row to the keyboard
|
ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder |
addRow(List<KeyboardButton> buttons)
*Optional*
Add a new row to the keyboard
|
ReplyKeyboardMarkup |
build()
Builds the ReplyKeyboardMarkup object
|
ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder |
oneTime(boolean oneTime)
*Optional*
Requests clients to hide the keyboard as soon as it's been used.
|
ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder |
resize(boolean resize)
*Optional*
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.ReplyKeyboardMarkupBuilder |
selective(boolean selective)
*Optional*
Use this parameter if you want to show the keyboard to specific users only.
|
ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder |
setCell(int row,
int column,
KeyboardButton button)
*Optional*
Sets a cell of the keyboard
|
ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder |
setRow(int row,
KeyboardButton... buttons)
*Optional*
Sets a row of the keyboard
|
ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder |
setRow(int row,
List<KeyboardButton> buttons)
*Optional*
Sets a row of the keyboard
|
public ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder addRow(KeyboardButton... buttons)
buttons - The buttons for the new rowpublic ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder addRow(List<KeyboardButton> buttons)
buttons - The buttons for the new rowpublic ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder setRow(int row, KeyboardButton... buttons)
row - The row you want to set the buttons forbuttons - The buttons for the rowIndexOutOfBoundsException - if the row is out of rangepublic ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder setRow(int row, List<KeyboardButton> buttons)
row - The index of the rowbuttons - The buttons for the rowIndexOutOfBoundsException - if the row is out of rangepublic ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder setCell(int row, int column, KeyboardButton button)
row - The index of the rowcolumn - The index of the columnbutton - The value for the cellIndexOutOfBoundsException - if the row or column is out of rangepublic ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder resize(boolean resize)
resize - Whether the client should resize the keyboardpublic ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder oneTime(boolean oneTime)
oneTime - Whether the keyboard is a one time keyboardpublic ReplyKeyboardMarkup.ReplyKeyboardMarkupBuilder selective(boolean selective)
selective - Whether the keyboard is a selective keyboardpublic ReplyKeyboardMarkup build()
Copyright © 2017. All rights reserved.