Skip to content

Choice Form Cell

The choice form cell allows the user to select a single value from a group of values. It uses Material Design Chips to display the set of values. Selecting a single chip automatically deselects all other chips in the set in the same way radio buttons work.


By default the chips are displayed on a single line that scrolls horizontally:

Choice chips

Choice chips scrolling horizontally

The chips can also wrap on to multiple lines:

Multi-line choice chips

The boolean attribute singleLine determines how the chips are placed.


By default chips are displayed with a filled background:

Filled chip

Chips can also be displayed with an outlined border:

Outlined chip

The boolean attribute outlined determines if chips are outlined.

Using Choice Form Cell

Choice form cell can be placed within your activity like any traditional Android view:

    app:key="Test ChoiceFormCell"
    android:entries="@array/tabValuesArray" />

Callback Mechanism

Choice form cell supports callback listeners, such as OnCellChangeListener<Integer>, to notify the application of changes to the selected choice.

The OnCellChangeListener<Integer> callback is called whenever a different chip is selected.

mChoiceFormCell = findViewById(;
mChoiceFormCell.setCellValueChangeListener(new FormCell.CellValueChangeListener<Integer>() {
    public void cellChangeHandler(Integer value) {
        // Value represents the nth chip in the set.
        // Do something with value...

Last update: April 14, 2021