Skip to content

Commit

Permalink
[0.6.x] Cherry pick fixes to 0.6.x (#2357)
Browse files Browse the repository at this point in the history
* Reduce spacing between icon and title on Confirmation to 8dp (was 12dp)

BUG: 352551711

* Update Confirmation layout (#2327)

(cherry picked from commit 1ae64ea)

* Picker (#2330)

* Visual update for pickers.

Horizontal padding set to 5.2%
Padding above and below picker is 4.dp on smaller screens (less than 225.dp) and
6.dp on bigger screens.

---------

Co-authored-by: ssancho14 <ssancho14@users.noreply.github.com>
(cherry picked from commit c5f962a)

* Dialog 2: Dialog Harder (#2343)

* Update dialogs following validation.

Top & bottom padding to be percent based (14.56% and 20.83% respectively).
Add 4.dp extra below the Title if there is no message.

Bug: http://b/352552040

---------

Co-authored-by: ssancho14 <ssancho14@users.noreply.github.com>
Co-authored-by: Yuri Schimke <yuri@schimke.ee>

(cherry picked from commit 6c92d68)

* Update ReponsiveTimeText to 0dp, which simulates 2dp


* Cherry pick specific fixes from #2342

---------

Co-authored-by: stevebower <stevebower@google.com>
Co-authored-by: ssancho14 <50666481+ssancho14@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 20, 2024
1 parent e8e3e78 commit 5e635b0
Show file tree
Hide file tree
Showing 554 changed files with 734 additions and 713 deletions.
2 changes: 1 addition & 1 deletion ai/sample/core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 21
Expand Down
2 changes: 1 addition & 1 deletion ai/sample/phone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.google.android.horologist.ai.sample"
Expand Down
2 changes: 1 addition & 1 deletion ai/sample/wear-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 30
Expand Down
4 changes: 2 additions & 2 deletions ai/sample/wear-gemini/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ plugins {
kotlin("android")
id("com.google.devtools.ksp")
id("dagger.hilt.android.plugin")
id("org.jetbrains.kotlin.plugin.serialization") version "1.9.24"
kotlin("plugin.serialization")
}

val localProperties = Properties().apply {
Expand All @@ -48,7 +48,7 @@ val localProperties = Properties().apply {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.google.android.horologist.ai.sample.wear.gemini"
Expand Down
2 changes: 1 addition & 1 deletion ai/sample/wear-prompt-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.google.android.horologist.ai.sample.prompt"
Expand Down
2 changes: 1 addition & 1 deletion ai/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 26
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion auth/composables/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 26
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion auth/data-phone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 21
Expand Down
2 changes: 1 addition & 1 deletion auth/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 26
Expand Down
2 changes: 1 addition & 1 deletion auth/sample/phone/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.google.android.horologist.auth.sample"
Expand Down
2 changes: 1 addition & 1 deletion auth/sample/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 21
Expand Down
2 changes: 1 addition & 1 deletion auth/sample/wear/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
applicationId = "com.google.android.horologist.auth.sample"
Expand Down
2 changes: 1 addition & 1 deletion auth/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 26
Expand Down
2 changes: 1 addition & 1 deletion composables/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

android {
compileSdk = 34
compileSdk = 35

defaultConfig {
minSdk = 26
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ public fun DatePicker(
}
}

val paddingAroundPicker = if (isLargeScreen) 6.dp else 4.dp

ScreenScaffold(
modifier = modifier
.fillMaxSize()
Expand Down Expand Up @@ -214,7 +216,7 @@ public fun DatePicker(
style = MaterialTheme.typography.button,
maxLines = 1,
)
Spacer(Modifier.height(4.dp))
Spacer(Modifier.height(paddingAroundPicker))
val spacerWidth = if (isLargeScreen) 6.dp else 2.dp
val textPadding = 6.dp // Update if UX decides a different value should be used.

Expand Down Expand Up @@ -333,7 +335,7 @@ public fun DatePicker(
)
}
}
Spacer(Modifier.height(4.dp))
Spacer(Modifier.height(paddingAroundPicker))
Button(
onClick = {
if (pickerGroupState.selectedIndex >= 2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ public fun TimePicker(
}
}

val paddingAroundPicker = if (isLargeScreen) 6.dp else 4.dp

ScreenScaffold(
modifier = modifier
.fillMaxSize()
Expand All @@ -227,11 +229,11 @@ public fun TimePicker(
style = MaterialTheme.typography.button,
maxLines = 1,
)
Spacer(Modifier.height(4.dp))
Spacer(Modifier.height(paddingAroundPicker))
Row(
// Horizontal padding is 2.08% + 5.2%
// Horizontal padding is 5.2%
modifier = Modifier
.fillMaxWidth(1 - 2 * 0.0728f)
.fillMaxWidth(1 - 2 * 0.052f)
.weight(1f),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
Expand Down Expand Up @@ -297,7 +299,7 @@ public fun TimePicker(
touchExplorationStateProvider = touchExplorationStateProvider,
)
}
Spacer(Modifier.height(4.dp))
Spacer(Modifier.height(paddingAroundPicker))
Button(
onClick = {
val seconds = if (showSeconds) secondState.selectedOption else 0
Expand Down Expand Up @@ -432,6 +434,8 @@ public fun TimePickerWith12HourClock(
}
}

val paddingAroundPicker = if (isLargeScreen) 6.dp else 4.dp

ScreenScaffold(
modifier = modifier
.fillMaxSize()
Expand All @@ -454,7 +458,7 @@ public fun TimePickerWith12HourClock(
style = MaterialTheme.typography.button,
maxLines = 1,
)
Spacer(Modifier.height(4.dp))
Spacer(Modifier.height(paddingAroundPicker))
FontScaleIndependent {
val measurer = rememberTextMeasurer()
val density = LocalDensity.current
Expand All @@ -479,7 +483,7 @@ public fun TimePickerWith12HourClock(

Row(
modifier = Modifier
.fillMaxWidth(1 - 2 * 0.0728f)
.fillMaxWidth(1 - 2 * 0.052f)
.weight(1f),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
Expand Down Expand Up @@ -551,7 +555,7 @@ public fun TimePickerWith12HourClock(
)
}
}
Spacer(Modifier.height(4.dp))
Spacer(Modifier.height(paddingAroundPicker))
Button(
onClick = {
val confirmedTime = LocalTime.of(
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5e635b0

Please sign in to comment.