diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/ActionTile.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/ActionTile.kt index 43184cee1..5b00612bb 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/ActionTile.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/ActionTile.kt @@ -40,7 +40,7 @@ fun ActionTile( colors = ListItemDefaults.colors( containerColor = if (selected) MaterialTheme.colorScheme.secondaryContainer else if (danger) MaterialTheme.colorScheme.errorContainer else itemBgColor ), - headlineContent = { + content = { Text( headline, color = if (selected) MaterialTheme.colorScheme.onSecondaryContainer else if (danger) MaterialTheme.colorScheme.onErrorContainer else MaterialTheme.colorScheme.onSurface, diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/CategoryTiles.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/CategoryTiles.kt index b96785e2c..00dbcb4bc 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/CategoryTiles.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/CategoryTiles.kt @@ -41,7 +41,7 @@ fun CategoryTile( colors = ListItemDefaults.colors( containerColor = itemBgColor ), - headlineContent = { Text(headline) }, + content = { Text(headline) }, supportingContent = { if (description != null) { Text(description) diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogSliderTile.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogSliderTile.kt index c6a1ff905..829123119 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogSliderTile.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogSliderTile.kt @@ -46,7 +46,7 @@ fun DialogSliderTile( containerColor = itemBgColor ), leadingContent = leading, - headlineContent = { Text(headline) }, + content = { Text(headline) }, supportingContent = { if (description != null) { Text( diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogTextFieldTile.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogTextFieldTile.kt index dc0b6cc52..4c78df28b 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogTextFieldTile.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/DialogTextFieldTile.kt @@ -38,7 +38,7 @@ fun DialogTextFieldTile( containerColor = itemBgColor ), leadingContent = leading, - headlineContent = { Text(headline) }, + content = { Text(headline) }, supportingContent = { if (description != null) Text( description, diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/SwitchTile.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/SwitchTile.kt index dc5a1f621..a3b037f26 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/SwitchTile.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/SwitchTile.kt @@ -47,7 +47,7 @@ fun SwitchTile( containerColor = itemBgColor ), leadingContent = leading, - headlineContent = { Text(headline) }, + content = { Text(headline) }, supportingContent = { if (description != null) Text(description) }, @@ -114,7 +114,7 @@ fun SingleSwitchTile( }, leadingContent = leading, - headlineContent = { Text(headline) }, + content = { Text(headline) }, supportingContent = { if (description != null) Text(description) }, diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/TextTile.kt b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/TextTile.kt index a112fe1e8..a42a46910 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/TextTile.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/core/ui/components/tiles/TextTile.kt @@ -30,7 +30,7 @@ fun TextTile( colors = ListItemDefaults.colors( containerColor = itemBgColor ), - headlineContent = { Text(headline) }, + content = { Text(headline) }, supportingContent = { if (description != null) { Text( diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/humidity/HumidityScreen.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/humidity/HumidityScreen.kt index f2f764d67..344f29ffc 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/humidity/HumidityScreen.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/humidity/HumidityScreen.kt @@ -152,7 +152,7 @@ fun HumidityScreen(navController: NavController, index: Int = 0, locationId: Str contentColor = Color.White ) }, - headlineContent = { Text(dewPointScaleText[index]) }, + content = { Text(dewPointScaleText[index]) }, trailingContent = { Text( if (units.tempUnit == TemperatureUnit.FAHRENHEIT) pair.second else pair.first, diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/uvindex/UvIndexScreen.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/uvindex/UvIndexScreen.kt index b40330ee3..c8ddb9adf 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/uvindex/UvIndexScreen.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/uvindex/UvIndexScreen.kt @@ -123,7 +123,7 @@ fun UvIndexScreen(navController: NavController, index: Int = 0, locationId: Stri contentColor = Color.White ) }, - headlineContent = { Text(it.toLabel(context)) }, + content = { Text(it.toLabel(context)) }, trailingContent = { Text( getUvIndexScaleFor(it), diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/visibility/VisibilityScreen.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/visibility/VisibilityScreen.kt index a18f8609a..aec4406c7 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/visibility/VisibilityScreen.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/blocks/screens/visibility/VisibilityScreen.kt @@ -129,7 +129,7 @@ fun VisibilityScreen(navController: NavController, index: Int = 0, locationId: S scale.forEach { ListItem( colors = ListItemDefaults.colors(containerColor = Color.Transparent), - headlineContent = { Text(it.headline) }, + content = { Text(it.headline) }, supportingContent = { Text(it.description) }, trailingContent = { Text( diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/locations/LocationsScreenContent.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/locations/LocationsScreenContent.kt index 3ab04e48b..fc408d05c 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/locations/LocationsScreenContent.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/locations/LocationsScreenContent.kt @@ -177,7 +177,7 @@ private fun UseDeviceLocationCard(onClick: () -> Unit, isLoading: Boolean = fals } } }, - headlineContent = { + content = { Text( stringResource(R.string.location_use_current), color = MaterialTheme.colorScheme.onSurface diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/ui/AlertsSection.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/ui/AlertsSection.kt index 4264874c7..6461e9518 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/ui/AlertsSection.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/main/ui/AlertsSection.kt @@ -66,7 +66,7 @@ fun AlertsSection( size = 32.dp ) }, - headlineContent = { Text(it.event) }, + content = { Text(it.event) }, supportingContent = { if (it.effective != null && it.expires != null) { Text("${formatter(it.effective)} • ${formatter(it.expires)}") diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/SettingsScreen.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/SettingsScreen.kt index 300e5c8f8..fe3b4d156 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/SettingsScreen.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/SettingsScreen.kt @@ -154,7 +154,7 @@ private fun DonateListItem(headline: String, description: String, icon: Int, onC ListItem( colors = ListItemDefaults.colors(containerColor = Color.Transparent), leadingContent = { WeatherIconBox(icon, size = 28.dp) }, - headlineContent = { Text(headline) }, + content = { Text(headline) }, supportingContent = { Text(description) }, modifier = Modifier .clickable(onClick = onClick) diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/about/AboutScreen.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/about/AboutScreen.kt index bb72e0bba..a89f258cf 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/about/AboutScreen.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/settings/about/AboutScreen.kt @@ -163,7 +163,7 @@ private fun AppVersionTile( colors = ListItemDefaults.colors( containerColor = MaterialTheme.colorScheme.tertiaryContainer ), - headlineContent = { + content = { Text( "WeatherMaster", color = MaterialTheme.colorScheme.onTertiaryContainer, diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/feature/shared/components/LocationItem.kt b/app/src/main/java/com/pranshulgg/weather_master_app/feature/shared/components/LocationItem.kt index 0619948d0..90cc72a4b 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/feature/shared/components/LocationItem.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/feature/shared/components/LocationItem.kt @@ -71,7 +71,7 @@ fun LocationItem( WeatherIconBox(icon, size = 34.dp) } }, - headlineContent = { + content = { if (isDefault) TitleForDefaultLocation( contentColor, title diff --git a/app/src/main/java/com/pranshulgg/weather_master_app/widgets/weather/ui/variants/WeatherWidgetLarge.kt b/app/src/main/java/com/pranshulgg/weather_master_app/widgets/weather/ui/variants/WeatherWidgetLarge.kt index 16ff41262..ca60cbd9f 100644 --- a/app/src/main/java/com/pranshulgg/weather_master_app/widgets/weather/ui/variants/WeatherWidgetLarge.kt +++ b/app/src/main/java/com/pranshulgg/weather_master_app/widgets/weather/ui/variants/WeatherWidgetLarge.kt @@ -1,5 +1,6 @@ package com.pranshulgg.weather_master_app.widgets.weather.ui.variants +import android.annotation.SuppressLint import androidx.compose.runtime.Composable import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp @@ -32,6 +33,7 @@ import com.pranshulgg.weather_master_app.widgets.ui.colors.WidgetColors import com.pranshulgg.weather_master_app.widgets.ui.colors.WidgetTheme import com.pranshulgg.weather_master_app.widgets.weather.components.WidgetHourlyItem +@SuppressLint("RestrictedApi") @Composable fun WeatherWidgetLarge( state: WidgetWeather?,