| Composable | View Widget |
|---|---|
| Column or Row | LinearLayout |
| Text | TextView |
| Image | ImageView |
| Button | Button |
| TextField | EditText |
| CheckBox | CheckBox |
| RadioButton | RadioButton |
| Slider | SeekBar |
| DropdownMenu | Spinner |
| DatePicker | CalendarView |
| LazyColumn or LazyRow |
ScrollView or HorizontalScrollView |
| Box | FrameLayout |
| Modifier Function | Parameters | Description |
|---|---|---|
| .size( ) | width, height | Sets specific dimensions in dp units. |
| .padding( ) | all,horizontal,vertical start,end,top,bottom | Adds space around the element in dp units. |
| .fillMaxWidth( ) | fraction : Float Default max fraction is 1.0, | Makes the element fill
available horizontal space. |
| .background( ) | color : Color object | Sets background of element. |
| .clickable( ) | enabled :
true, onClick : ( ) -> Unit |
Makes element clickable. Button has its own onClick parameter. |
| .offset( ) | x, y : Float | Sets offset of element. |
Column(modifier=Modifier
.padding(all=20.dp)
.background(color=Color.Silver)
.fillMaxWidth( ))
* denotes a manditory parameter.