Добавить
Уведомления

Android Compose Demo: Spinners aka Drop-Down Selects aka DropDownMenu

In this video we look at Android kotlin code that uses Compose. The code contains a @composable function that generates a dropdownmenu filled with dropdownmenuitem's -- what is called a spinner in older Android apps or would be called a drop-down select in HTML. The app uses three spinners which allow the user to select a room, a day of the week, and a time of day to make a reservation. Access to the "state" variables is "passed" to the function, so that the user can set the state using the spinner and that state causes various parts of the screen to be "recomposed." The whole exercise is done twice -- once in which the "state" variables are strings such as room H153, day Tues, and time 11:00 -- and second time in the "state" variables are indices such as 1 (room selected index), 1 (day selected index) and 2 (time selected index).

Иконка канала Android Detect
1 подписчик
12+
12 просмотров
Год назад
17 октября 2024 г.
12+
12 просмотров
Год назад
17 октября 2024 г.

In this video we look at Android kotlin code that uses Compose. The code contains a @composable function that generates a dropdownmenu filled with dropdownmenuitem's -- what is called a spinner in older Android apps or would be called a drop-down select in HTML. The app uses three spinners which allow the user to select a room, a day of the week, and a time of day to make a reservation. Access to the "state" variables is "passed" to the function, so that the user can set the state using the spinner and that state causes various parts of the screen to be "recomposed." The whole exercise is done twice -- once in which the "state" variables are strings such as room H153, day Tues, and time 11:00 -- and second time in the "state" variables are indices such as 1 (room selected index), 1 (day selected index) and 2 (time selected index).

, чтобы оставлять комментарии