Theme and typography changes
This commit is contained in:
parent
0abb198fdd
commit
c9539b915e
@ -37,6 +37,7 @@
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/LauncherTheme.DefaultColors"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:ignore="GoogleAppIndexingWarning">
|
||||
|
||||
|
||||
@ -28,8 +28,7 @@
|
||||
android:hint="@string/websearch_dialog_name_hint"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||
android:textFontWeight="600"
|
||||
android:textAppearance="?textAppearanceHeadlineSmall"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
@ -64,7 +63,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/websearch_dialog_url_description"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
|
||||
android:textAppearance="?textAppearanceLabelSmall"
|
||||
app:layout_constraintEnd_toEndOf="@+id/websearchUrl"
|
||||
app:layout_constraintStart_toStartOf="@+id/websearchUrl"
|
||||
app:layout_constraintTop_toBottomOf="@+id/websearchUrl" />
|
||||
|
||||
@ -21,6 +21,6 @@
|
||||
android:layout_gravity="center|top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
android:text="@string/easter_egg_text" />
|
||||
</FrameLayout>
|
||||
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -12,23 +13,24 @@
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp" />
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
android:padding="16dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/website"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:drawableStart="@drawable/ic_open_in_browser"
|
||||
android:drawablePadding="4dp"
|
||||
android:drawableTint="?colorAccent"
|
||||
app:drawableStartCompat="@drawable/ic_open_in_browser"
|
||||
android:drawablePadding="8dp"
|
||||
app:drawableTint="?colorPrimary"
|
||||
android:focusable="true"
|
||||
android:foreground="?selectableItemBackgroundBorderless"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp"
|
||||
android:text="@string/open_webpage"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Widget.Button.Borderless.Colored"
|
||||
android:textColor="?android:colorAccent" />
|
||||
android:textAppearance="?textAppearanceLabelLarge"
|
||||
android:textColor="?colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/licenseTitle"
|
||||
@ -37,18 +39,21 @@
|
||||
android:padding="16dp"
|
||||
android:textAllCaps="true"
|
||||
android:textSize="14sp"
|
||||
android:textAppearance="?textAppearanceTitleSmall"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/licenseCopyright"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
android:padding="16dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/licenseText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
android:padding="16dp" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:src="@drawable/ic_permission_calendar"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:paddingStart="54dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
||||
tools:text="@string/permission_calendar_widget"/>
|
||||
</FrameLayout>
|
||||
@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<style name="DefaultColors" parent="Theme.Material3.DayNight">
|
||||
<style name="DefaultColors" parent="BaseTheme">
|
||||
<item name="colorPrimary">@android:color/system_accent1_200</item>
|
||||
<item name="colorOnPrimary">@android:color/system_accent1_800</item>
|
||||
<item name="colorPrimaryContainer">@android:color/system_accent1_700</item>
|
||||
@ -21,7 +21,7 @@
|
||||
<item name="android:colorBackground">@android:color/system_neutral1_900</item>
|
||||
<item name="colorOnBackground">@android:color/system_neutral1_100</item>
|
||||
<item name="colorSurface">@android:color/system_neutral1_900</item>
|
||||
<item name="colorOnSurface">@android:color/system_neutral1_200</item>
|
||||
<item name="colorOnSurface">@android:color/system_neutral1_100</item>
|
||||
<item name="colorSurfaceVariant">@android:color/system_neutral2_700</item>
|
||||
<item name="colorOnSurfaceVariant">@android:color/system_neutral2_200</item>
|
||||
<item name="colorSurfaceInverse">@android:color/system_neutral1_100</item>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<style name="DefaultColors" parent="Theme.Material3.DayNight">
|
||||
<style name="DefaultColors" parent="BaseTheme">
|
||||
<item name="colorPrimary">#72D1FF</item>
|
||||
<item name="colorOnPrimary">#003549</item>
|
||||
<item name="colorPrimaryContainer">#004D68</item>
|
||||
@ -29,7 +29,7 @@
|
||||
<item name="elevationOverlayEnabled">true</item>
|
||||
</style>
|
||||
|
||||
<style name="BlackWhiteColors" parent="Theme.Material3.DayNight">
|
||||
<style name="BlackWhiteColors" parent="BaseTheme">
|
||||
<item name="colorPrimary">@android:color/white</item>
|
||||
<item name="colorOnPrimary">@android:color/black</item>
|
||||
<item name="colorPrimaryContainer">@android:color/black</item>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<style name="DefaultColors" parent="Theme.Material3.DayNight">
|
||||
<style name="DefaultColors" parent="BaseTheme">
|
||||
<item name="colorPrimary">@android:color/system_accent1_600</item>
|
||||
<item name="colorOnPrimary">@android:color/system_accent1_0</item>
|
||||
<item name="colorPrimaryContainer">@android:color/system_accent1_100</item>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<style name="DefaultColors" parent="Theme.Material3.DayNight">
|
||||
<style name="DefaultColors" parent="BaseTheme">
|
||||
<item name="colorPrimary">#006689</item>
|
||||
<item name="colorOnPrimary">@android:color/white</item>
|
||||
<item name="colorPrimaryContainer">#BFE8FF</item>
|
||||
@ -29,7 +29,7 @@
|
||||
<item name="elevationOverlayEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="BlackWhiteColors" parent="Theme.Material3.DayNight">
|
||||
<style name="BlackWhiteColors" parent="BaseTheme">
|
||||
<item name="colorPrimary">@android:color/black</item>
|
||||
<item name="colorOnPrimary">@android:color/white</item>
|
||||
<item name="colorPrimaryContainer">@android:color/white</item>
|
||||
|
||||
@ -1,5 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="BaseTheme" parent="Theme.Material3.DayNight">
|
||||
<item name="textAppearanceDisplayLarge">@style/Typography.Display.Large</item>
|
||||
<item name="textAppearanceDisplayMedium">@style/Typography.Display.Medium</item>
|
||||
<item name="textAppearanceDisplaySmall">@style/Typography.Display.Small</item>
|
||||
<item name="textAppearanceHeadlineLarge">@style/Typography.Headline.Large</item>
|
||||
<item name="textAppearanceHeadlineMedium">@style/Typography.Headline.Medium</item>
|
||||
<item name="textAppearanceHeadlineSmall">@style/Typography.Headline.Small</item>
|
||||
<item name="textAppearanceTitleLarge">@style/Typography.Title.Large</item>
|
||||
<item name="textAppearanceTitleMedium">@style/Typography.Title.Medium</item>
|
||||
<item name="textAppearanceTitleSmall">@style/Typography.Title.Small</item>
|
||||
<item name="textAppearanceBodyLarge">@style/Typography.Body.Large</item>
|
||||
<item name="textAppearanceBodyMedium">@style/Typography.Body.Medium</item>
|
||||
<item name="textAppearanceBodySmall">@style/Typography.Body.Small</item>
|
||||
<item name="textAppearanceLabelLarge">@style/Typography.Label.Large</item>
|
||||
<item name="textAppearanceLabelMedium">@style/Typography.Label.Medium</item>
|
||||
<item name="textAppearanceLabelSmall">@style/Typography.Label.Small</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="SettingsTheme.DefaultColors" parent="DefaultColors">
|
||||
<item name="android:statusBarColor">?colorSurface</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
|
||||
@ -1,28 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="TextAppearance">
|
||||
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Heading1">
|
||||
<item name="android:textColor">@color/text_color_primary</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:fontFamily">sans-serif-medium</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Heading2">
|
||||
<item name="android:textColor">@color/text_color_primary</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Heading3">
|
||||
<item name="android:textColor">@color/text_color_primary</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Body1">
|
||||
<item name="android:textColor">@color/text_color_primary</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.Body2">
|
||||
<item name="android:textColor">@color/text_color_secondary</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Display.Large" parent="TextAppearance.Material3.DisplaySmall">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">500</item>
|
||||
<item name="android:textFontWeight">500</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Display.Medium" parent="TextAppearance.Material3.DisplaySmall">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">500</item>
|
||||
<item name="android:textFontWeight">500</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Display.Small" parent="TextAppearance.Material3.DisplaySmall">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">500</item>
|
||||
<item name="android:textFontWeight">500</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Headline.Large" parent="TextAppearance.Material3.HeadlineLarge">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Headline.Medium" parent="TextAppearance.Material3.HeadlineMedium">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Headline.Small" parent="TextAppearance.Material3.HeadlineSmall">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Title.Large" parent="TextAppearance.Material3.TitleLarge">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Title.Medium" parent="TextAppearance.Material3.TitleMedium">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Title.Small" parent="TextAppearance.Material3.TitleSmall">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Label.Large" parent="TextAppearance.Material3.LabelLarge">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Label.Medium" parent="TextAppearance.Material3.LabelMedium">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Label.Small" parent="TextAppearance.Material3.LabelSmall">
|
||||
<item name="fontFamily">@font/poppins</item>
|
||||
<item name="fontWeight">600</item>
|
||||
<item name="android:textFontWeight">600</item>
|
||||
</style>
|
||||
|
||||
<style name="Typography.Body.Large" parent="TextAppearance.Material3.BodyLarge" />
|
||||
|
||||
<style name="Typography.Body.Medium" parent="TextAppearance.Material3.BodyMedium" />
|
||||
|
||||
<style name="Typography.Body.Small" parent="TextAppearance.Material3.BodySmall" />
|
||||
|
||||
|
||||
</resources>
|
||||
@ -81,9 +81,6 @@ fun UnitConverterItem(
|
||||
Column {
|
||||
for ((i, unit) in unitConverter.values.withIndex()) {
|
||||
if (!showAll && i >= 5) break
|
||||
val text = AnnotatedString.Builder().apply {
|
||||
append(" ${unit.formattedName} (${unit.symbol})")
|
||||
}.toAnnotatedString()
|
||||
Text(
|
||||
text = "${unit.formattedName} (${unit.symbol})",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
|
||||
@ -9,10 +9,8 @@ import androidx.compose.animation.ExperimentalAnimationApi
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.ContentAlpha
|
||||
import androidx.compose.material.DropdownMenu
|
||||
import androidx.compose.material.DropdownMenuItem
|
||||
import androidx.compose.material.LocalContentAlpha
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.rounded.ArrowDropDown
|
||||
import androidx.compose.material3.*
|
||||
@ -100,9 +98,10 @@ fun WeatherWidget() {
|
||||
})
|
||||
.padding(vertical = 12.dp)
|
||||
) {
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
|
||||
Text(text = stringResource(id = if (detailsExpanded) R.string.weather_widget_hide_details else R.string.weather_widget_show_details), style = MaterialTheme.typography.bodySmall)
|
||||
}
|
||||
Text(
|
||||
text = stringResource(id = if (detailsExpanded) R.string.weather_widget_hide_details else R.string.weather_widget_show_details),
|
||||
style = MaterialTheme.typography.bodySmall
|
||||
)
|
||||
}
|
||||
|
||||
AnimatedVisibility(visible = detailsExpanded) {
|
||||
@ -144,29 +143,27 @@ fun WeatherWidget() {
|
||||
modifier = Modifier.align(Alignment.End)
|
||||
|
||||
) {
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
|
||||
|
||||
Text(
|
||||
text = "${selectedForecast.provider} (${
|
||||
formatTime(
|
||||
LocalContext.current,
|
||||
selectedForecast.updateTime
|
||||
)
|
||||
})",
|
||||
style = TextStyle(
|
||||
fontSize = 10.sp
|
||||
),
|
||||
modifier = Modifier
|
||||
.clickable(onClick = {
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
data = Uri.parse(selectedForecast.providerUrl)
|
||||
?: return@clickable
|
||||
}
|
||||
context.tryStartActivity(intent)
|
||||
})
|
||||
.padding(start = 8.dp, top = 4.dp, bottom = 4.dp, end = 16.dp)
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = "${selectedForecast.provider} (${
|
||||
formatTime(
|
||||
LocalContext.current,
|
||||
selectedForecast.updateTime
|
||||
)
|
||||
})",
|
||||
style = TextStyle(
|
||||
fontSize = 10.sp
|
||||
),
|
||||
modifier = Modifier
|
||||
.clickable(onClick = {
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
data = Uri.parse(selectedForecast.providerUrl)
|
||||
?: return@clickable
|
||||
}
|
||||
context.tryStartActivity(intent)
|
||||
})
|
||||
.padding(start = 8.dp, top = 4.dp, bottom = 4.dp, end = 16.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -197,17 +194,15 @@ fun WeatherWidget() {
|
||||
@Composable
|
||||
fun WeatherDetailRow(title: String, value: String) {
|
||||
Row {
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
|
||||
Text(
|
||||
text = title,
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
)
|
||||
Text(
|
||||
text = value,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = title,
|
||||
modifier = Modifier.padding(end = 8.dp),
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
)
|
||||
Text(
|
||||
text = value,
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,29 +227,27 @@ fun WeatherDaySelector(
|
||||
horizontalArrangement = Arrangement.Start
|
||||
) {
|
||||
WeatherIcon(icon = weatherIconById(selectedDay.icon))
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.high) {
|
||||
Text(
|
||||
text = dateFormat.format(selectedDay.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterVertically)
|
||||
.padding(start = 16.dp, end = 8.dp)
|
||||
)
|
||||
Text(
|
||||
text = "${
|
||||
convertTemperature(
|
||||
imperialUnits,
|
||||
selectedDay.minTemp
|
||||
)
|
||||
}° / ${convertTemperature(imperialUnits, selectedDay.maxTemp)}°",
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
Icon(
|
||||
imageVector = Icons.Rounded.ArrowDropDown,
|
||||
contentDescription = null
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = dateFormat.format(selectedDay.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterVertically)
|
||||
.padding(start = 16.dp, end = 8.dp)
|
||||
)
|
||||
Text(
|
||||
text = "${
|
||||
convertTemperature(
|
||||
imperialUnits,
|
||||
selectedDay.minTemp
|
||||
)
|
||||
}° / ${convertTemperature(imperialUnits, selectedDay.maxTemp)}°",
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
Icon(
|
||||
imageVector = Icons.Rounded.ArrowDropDown,
|
||||
contentDescription = null
|
||||
)
|
||||
}
|
||||
DropdownMenu(
|
||||
expanded = menuExpanded.value,
|
||||
@ -272,28 +265,26 @@ fun WeatherDaySelector(
|
||||
) {
|
||||
Row {
|
||||
WeatherIcon(icon = weatherIconById(d.icon))
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.high) {
|
||||
Text(
|
||||
text = dateFormat.format(d.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
softWrap = false,
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterVertically)
|
||||
.padding(start = 16.dp, end = 8.dp)
|
||||
.weight(1f)
|
||||
)
|
||||
Text(
|
||||
text = "${
|
||||
convertTemperature(
|
||||
imperialUnits,
|
||||
d.minTemp
|
||||
)
|
||||
}° / ${convertTemperature(imperialUnits, d.maxTemp)}°",
|
||||
softWrap = false,
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = dateFormat.format(d.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
softWrap = false,
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterVertically)
|
||||
.padding(start = 16.dp, end = 8.dp)
|
||||
.weight(1f)
|
||||
)
|
||||
Text(
|
||||
text = "${
|
||||
convertTemperature(
|
||||
imperialUnits,
|
||||
d.minTemp
|
||||
)
|
||||
}° / ${convertTemperature(imperialUnits, d.maxTemp)}°",
|
||||
softWrap = false,
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -323,13 +314,11 @@ fun WeatherTimeSelector(
|
||||
})
|
||||
.padding(16.dp)
|
||||
) {
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.high) {
|
||||
Text(
|
||||
text = dateFormat.format(selectedForecast.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = dateFormat.format(selectedForecast.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
Icon(
|
||||
imageVector = Icons.Rounded.ArrowDropDown,
|
||||
contentDescription = null
|
||||
@ -349,25 +338,21 @@ fun WeatherTimeSelector(
|
||||
}) {
|
||||
Row {
|
||||
WeatherIcon(icon = weatherIconById(fc.icon), night = fc.night)
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.high) {
|
||||
Text(
|
||||
text = dateFormat.format(fc.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
softWrap = false,
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterVertically)
|
||||
.padding(start = 16.dp, end = 8.dp)
|
||||
.weight(1f)
|
||||
)
|
||||
}
|
||||
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
|
||||
Text(
|
||||
text = "${convertTemperature(imperialUnits, fc.temperature)}°",
|
||||
softWrap = false,
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = dateFormat.format(fc.timestamp),
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
softWrap = false,
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterVertically)
|
||||
.padding(start = 16.dp, end = 8.dp)
|
||||
.weight(1f)
|
||||
)
|
||||
Text(
|
||||
text = "${convertTemperature(imperialUnits, fc.temperature)}°",
|
||||
softWrap = false,
|
||||
style = MaterialTheme.typography.titleSmall,
|
||||
modifier = Modifier.align(Alignment.CenterVertically)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.Heading1"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/icon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@ -52,7 +52,7 @@
|
||||
android:layout_marginEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:textAppearance="@style/TextAppearance.Body1"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
app:layout_constraintEnd_toStartOf="@+id/icon"
|
||||
app:layout_constraintStart_toStartOf="@+id/appName"
|
||||
app:layout_constraintTop_toBottomOf="@+id/appName"
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
android:layout_marginBottom="4dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/TextAppearance.Body1"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:maxLines="1"
|
||||
android:transitionName="label"
|
||||
tools:text="Application" />
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
android:id="@+id/calculatorTerm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="@style/TextAppearance.Card.Subtitle"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textAppearance="?textAppearanceLabelLarge"
|
||||
android:textColor="?colorSecondary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@ -33,7 +33,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/calculatorTerm"
|
||||
@ -46,9 +46,9 @@
|
||||
android:layout_gravity="start"
|
||||
android:layout_marginStart="8dp"
|
||||
android:gravity="start"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
app:layout_constraintStart_toEndOf="@+id/calculatorLabelHexBinOct"
|
||||
app:layout_constraintTop_toTopOf="@+id/calculatorLabelHexBinOct"
|
||||
tools:text="0111\n007\n07" />
|
||||
@ -60,9 +60,9 @@
|
||||
android:layout_gravity="start"
|
||||
android:gravity="start"
|
||||
android:text="@string/calculator_bin_oct_hex_label"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:textSize="13sp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/calculatorSolution" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@ -36,12 +36,10 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/calendarColor"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
tools:text="Event title" />
|
||||
|
||||
<View
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:textAppearance="@style/TextAppearance.Heading2"
|
||||
android:textAppearance="?textAppearanceTitleSmall"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideline4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/calendarColor"
|
||||
@ -38,7 +38,7 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:paddingBottom="14dp"
|
||||
android:textAppearance="@style/TextAppearance.Body1"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/calendarColor"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline4"
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
android:layout_gravity="center"
|
||||
|
||||
android:clickable="true"
|
||||
android:drawableEnd="@drawable/ic_arrow_drop_down"
|
||||
android:drawableTint="@color/text_color_primary"
|
||||
app:drawableEndCompat="@drawable/ic_arrow_drop_down"
|
||||
app:drawableTint="@color/text_color_primary"
|
||||
android:ellipsize="end"
|
||||
android:focusable="true"
|
||||
android:foreground="?selectableItemBackgroundBorderless"
|
||||
@ -34,7 +34,7 @@
|
||||
android:maxLines="1"
|
||||
android:text="@string/date_today"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.Heading1" />
|
||||
android:textAppearance="?textAppearanceTitleMedium" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
@ -112,7 +112,7 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/calendar_widget_pinned_events"
|
||||
android:textAppearance="@style/TextAppearance.Heading1"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@ -36,10 +36,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:textSize="24sp"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:transitionName="contactLabel"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideline3"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
|
||||
@ -27,13 +27,12 @@
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_color_primary"
|
||||
android:transitionName="contactLabel"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideline2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
android:textAppearance="?textAppearanceTitleSmall"
|
||||
tools:text="Ulick N. Owen" />
|
||||
|
||||
|
||||
@ -46,6 +45,7 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline2"
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
android:layout_marginBottom="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textAppearance="?textAppearanceTitleMedium"
|
||||
android:transitionName="fileLabel"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideline"
|
||||
app:layout_constraintEnd_toStartOf="@+id/icon"
|
||||
@ -44,7 +44,7 @@
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textAppearance="@style/TextAppearance.Card.Subtitle"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:transitionName="description"
|
||||
app:layout_constraintEnd_toStartOf="@+id/icon"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
@ -59,7 +59,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_begin="32dp" />
|
||||
app:layout_constraintGuide_begin="36dp" />
|
||||
|
||||
<de.mm20.launcher2.ui.legacy.view.LauncherIconView
|
||||
android:id="@+id/icon"
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
android:layout_marginBottom="2dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textAppearance="?textAppearanceTitleSmall"
|
||||
android:transitionName="fileLabel"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideline"
|
||||
app:layout_constraintEnd_toStartOf="@+id/icon"
|
||||
@ -45,7 +45,7 @@
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:ellipsize="end"
|
||||
android:textAppearance="@style/TextAppearance.Card.Subtitle"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
android:transitionName="description"
|
||||
app:layout_constraintEnd_toStartOf="@+id/icon"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="12dp"
|
||||
android:textAppearance="@style/TextAppearance.Body2"
|
||||
android:textAppearance="?textAppearanceBodySmall"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideline4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/calendarColor"
|
||||
|
||||
@ -3,14 +3,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:drawablePadding="12dp"
|
||||
android:padding="12dp"
|
||||
tools:text="12:00"
|
||||
android:gravity="center_vertical"
|
||||
android:drawableTint="@color/text_color_primary"
|
||||
app:drawableTint="@color/text_color_primary"
|
||||
android:foreground="?selectableItemBackground"
|
||||
tools:drawableStart="@drawable/ic_time"
|
||||
android:textAppearance="@style/TextAppearance.Body1">
|
||||
android:textAppearance="?textAppearanceBodyMedium">
|
||||
|
||||
</TextView>
|
||||
@ -19,7 +19,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:padding="12dp"
|
||||
android:layout_marginStart="56dp"
|
||||
android:textAppearance="@style/TextAppearance.Body1"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
app:layout_constraintBottom_toTopOf="@+id/guideline4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/calendarColor"
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_toStartOf="@id/websiteFavIcon"
|
||||
android:textAppearance="@style/TextAppearance.Heading1"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
app:layout_constraintEnd_toStartOf="@+id/websiteFavIcon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/websiteImage" />
|
||||
@ -54,7 +54,7 @@
|
||||
android:layout_toStartOf="@id/websiteFavIcon"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="5"
|
||||
android:textAppearance="@style/TextAppearance.Body1"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
app:layout_constraintEnd_toStartOf="@+id/websiteFavIcon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/websiteTitle" />
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
android:layout_margin="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Headline"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<de.mm20.launcher2.ui.legacy.view.WidgetResizeDragView
|
||||
|
||||
@ -23,11 +23,12 @@
|
||||
<TextView
|
||||
android:id="@+id/wikipediaTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/TextAppearance.Heading1"
|
||||
android:paddingBottom="4dp"
|
||||
android:textAppearance="?textAppearanceTitleLarge"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wikipediaImage"
|
||||
@ -40,7 +41,8 @@
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:text="@string/wikipedia_source"
|
||||
android:textAppearance="@style/TextAppearance.Body2"
|
||||
android:textAppearance="?textAppearanceLabelMedium"
|
||||
android:textColor="?colorSecondary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wikipediaTitle"/>
|
||||
@ -54,7 +56,7 @@
|
||||
android:paddingEnd="16dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="8"
|
||||
android:textAppearance="@style/TextAppearance.Body1"
|
||||
android:textAppearance="?textAppearanceBodyMedium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/wikipediaSubTitle"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user