# Button Lists

DevFeed: [Button Lists](<https://devfeed.tech/articles/button-lists-19233.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/button-lists/>)

Author: Shai Almog

Published: 2018-12-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [API](<https://devfeed.tech/topics/api.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [demo](<https://devfeed.tech/tags/demo.md>), [developers](<https://devfeed.tech/tags/developers.md>), [dialog](<https://devfeed.tech/tags/dialog.md>), [ios](<https://devfeed.tech/tags/ios.md>), [issue](<https://devfeed.tech/tags/issue.md>), [layout](<https://devfeed.tech/tags/layout.md>), [legacy](<https://devfeed.tech/tags/legacy.md>), [list](<https://devfeed.tech/tags/list.md>), [state](<https://devfeed.tech/tags/state.md>), [view](<https://devfeed.tech/tags/view.md>)

## AI overview

This tutorial introduces ButtonList and its CheckBoxList, RadioButtonList, and SwitchList subclasses. It explains how they apply list-model concepts with a layout/container hierarchy, including sharing one model between lists and synchronizing checkbox and switch changes.

## Source excerpt

I wrote in the past about the problems in the List class, so I won't rehash them here. However, the ideas behind list are still valuable. One such idea is the list model which allows us to separate the state from the view. Unfortunately the renderer architecture makes this hard to implement for most developers and limits the flexibility of the API. To leverage this idea with the easier to use layout/container hierarchy we introduced ButtonList and its subclasses: CheckBoxList, RadioButtonList & SwitchList.