@@ -63,53 +63,56 @@ private fun Loading() {
63
63
64
64
@Composable
65
65
private fun Data (state : ArrivalsState .Data , onClickRefresh : () -> Unit ) {
66
- Column (
67
- modifier = Modifier
68
- .padding(top = 44 .dp, bottom = 16 .dp, start = 32 .dp, end = 32 .dp)
69
- .fillMaxWidth(),
70
- verticalArrangement = Arrangement .spacedBy(32 .dp)
71
- ) {
72
- state.result.arrivals.forEach {
73
- ArrivalRow (it)
66
+ Column {
67
+ Column (
68
+ modifier = Modifier
69
+ .padding(top = 32 .dp, bottom = 20 .dp, start = 32 .dp, end = 32 .dp)
70
+ .weight(1f )
71
+ .fillMaxWidth(),
72
+ verticalArrangement = Arrangement .SpaceEvenly
73
+ ) {
74
+ state.result.arrivals.forEach {
75
+ ArrivalRow (it)
76
+ }
74
77
}
75
- }
76
- Row (
77
- modifier = Modifier
78
- .background(color = Footer )
79
- .padding(start = 32 .dp, end = 28 .dp)
80
- .fillMaxWidth()
81
- .height(70 .dp),
82
- horizontalArrangement = Arrangement .SpaceBetween ,
83
- verticalAlignment = Alignment .CenterVertically
84
- ) {
85
- Text (
86
- modifier = Modifier .padding(bottom = 4 .dp),
87
- text = state.result.station,
88
- color = Text ,
89
- style = TextStyle (
90
- fontSize = 32 .sp
91
- )
92
- )
93
- Box (
94
- modifier = Modifier .size(42 .dp),
95
- contentAlignment = Alignment .Center
78
+ Row (
79
+ modifier = Modifier
80
+ .background(color = Footer )
81
+ .padding(start = 32 .dp, end = 28 .dp)
82
+ .fillMaxWidth()
83
+ .height(70 .dp),
84
+ horizontalArrangement = Arrangement .SpaceBetween ,
85
+ verticalAlignment = Alignment .CenterVertically
96
86
) {
97
- if (state.refreshing) {
98
- CircularProgressIndicator (color = LedYellow , modifier = Modifier .size(22 .dp))
99
- } else {
100
- TextButton (
101
- onClick = { onClickRefresh() },
102
- colors = ButtonDefaults .textButtonColors(
103
- contentColor = Text ,
104
- backgroundColor = Footer
105
- )
106
- ) {
107
- Icon (
108
- Icons .Rounded .Refresh ,
109
- contentDescription = " Refresh" ,
110
- modifier = Modifier .size(32 .dp),
111
- tint = Text
112
- )
87
+ Text (
88
+ modifier = Modifier .padding(bottom = 4 .dp),
89
+ text = state.result.station,
90
+ color = Text ,
91
+ style = TextStyle (
92
+ fontSize = 32 .sp
93
+ )
94
+ )
95
+ Box (
96
+ modifier = Modifier .size(42 .dp),
97
+ contentAlignment = Alignment .Center
98
+ ) {
99
+ if (state.refreshing) {
100
+ CircularProgressIndicator (color = LedYellow , modifier = Modifier .size(22 .dp))
101
+ } else {
102
+ TextButton (
103
+ onClick = { onClickRefresh() },
104
+ colors = ButtonDefaults .textButtonColors(
105
+ contentColor = Text ,
106
+ backgroundColor = Footer
107
+ )
108
+ ) {
109
+ Icon (
110
+ Icons .Rounded .Refresh ,
111
+ contentDescription = " Refresh" ,
112
+ modifier = Modifier .size(32 .dp),
113
+ tint = Text
114
+ )
115
+ }
113
116
}
114
117
}
115
118
}
0 commit comments