Skip to content

Commit 48a7568

Browse files
committed
Changed the Row of ActivityStatsSmallOverview to FlowRow to wrap the items to a new row when there is not enough space.
When you change the Font size or Display size to maximum on your device, the Type stat will move to a new Row.
1 parent a3a0f03 commit 48a7568

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/src/main/java/nl/nickkoepr/bored/ui/screens/favorites/FavoritesScreen.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import androidx.compose.animation.togetherWith
88
import androidx.compose.foundation.clickable
99
import androidx.compose.foundation.layout.Arrangement
1010
import androidx.compose.foundation.layout.Column
11+
import androidx.compose.foundation.layout.ExperimentalLayoutApi
12+
import androidx.compose.foundation.layout.FlowRow
1113
import androidx.compose.foundation.layout.Row
1214
import androidx.compose.foundation.layout.Spacer
1315
import androidx.compose.foundation.layout.fillMaxSize
@@ -153,9 +155,10 @@ fun FavoriteCard(
153155
* Row containing all the different activity stats with an icon and the given stat.
154156
* @param activity activity whose status should be shown.
155157
*/
158+
@OptIn(ExperimentalLayoutApi::class)
156159
@Composable
157160
fun ActivityStatsSmallOverview(activity: Activity, modifier: Modifier = Modifier) {
158-
Row(modifier = modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
161+
FlowRow(modifier = modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) {
159162
ActivityStatsSmallItem(
160163
selectedFilter = SelectedFilter.ACCESSIBILITY,
161164
value = activity.accessibility.toPercent()

0 commit comments

Comments
 (0)