diff --git a/compose-layout/api/current.api b/compose-layout/api/current.api index 2d3e40c401..85a7a48407 100644 --- a/compose-layout/api/current.api +++ b/compose-layout/api/current.api @@ -55,6 +55,11 @@ package com.google.android.horologist.compose.layout { method @androidx.compose.runtime.Composable public static void PagerScaffold(optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0? timeText, optional androidx.compose.foundation.pager.PagerState? pagerState, kotlin.jvm.functions.Function1 content); } + public final class ResponsiveTimeTextKt { + method @androidx.compose.runtime.Composable public static void ResponsiveTimeText(optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.TimeSource timeSource, optional androidx.compose.ui.text.TextStyle timeTextStyle, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function0? startLinearContent, optional kotlin.jvm.functions.Function1? startCurvedContent, optional kotlin.jvm.functions.Function0? endLinearContent, optional kotlin.jvm.functions.Function1? endCurvedContent, optional kotlin.jvm.functions.Function0 textLinearSeparator, optional kotlin.jvm.functions.Function1 textCurvedSeparator); + method @androidx.compose.runtime.Composable public static androidx.compose.foundation.layout.PaddingValues responsivePaddingDefaults(); + } + public final class ScalingLazyColumnDefaults { method @com.google.android.horologist.annotations.ExperimentalHorologistApi public com.google.android.horologist.compose.layout.ScalingLazyColumnState.Factory belowTimeText(optional com.google.android.horologist.compose.layout.ScalingLazyColumnState.RotaryMode rotaryMode, optional boolean firstItemIsFullWidth, optional androidx.compose.foundation.layout.Arrangement.Vertical verticalArrangement, optional androidx.compose.ui.Alignment.Horizontal horizontalAlignment, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional float topPaddingDp); method @com.google.android.horologist.annotations.ExperimentalHorologistApi public com.google.android.horologist.compose.layout.ScalingLazyColumnState.Factory responsive(optional boolean firstItemIsFullWidth, optional float additionalPaddingAtBottom, optional androidx.compose.foundation.layout.Arrangement.Vertical verticalArrangement, optional float horizontalPaddingPercent, optional com.google.android.horologist.compose.layout.ScalingLazyColumnState.RotaryMode? rotaryMode, optional boolean hapticsEnabled, optional boolean reverseLayout, optional boolean userScrollEnabled); diff --git a/compose-material/src/debug/java/com/google/android/horologist/compose/material/ResponsiveTimeTextPreview.kt b/compose-layout/src/debug/java/com/google/android/horologist/compose/layout/ResponsiveTimeTextPreview.kt similarity index 93% rename from compose-material/src/debug/java/com/google/android/horologist/compose/material/ResponsiveTimeTextPreview.kt rename to compose-layout/src/debug/java/com/google/android/horologist/compose/layout/ResponsiveTimeTextPreview.kt index e25d86eed1..76ed28051c 100644 --- a/compose-material/src/debug/java/com/google/android/horologist/compose/material/ResponsiveTimeTextPreview.kt +++ b/compose-layout/src/debug/java/com/google/android/horologist/compose/layout/ResponsiveTimeTextPreview.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.android.horologist.compose.material +package com.google.android.horologist.compose.layout import androidx.compose.runtime.Composable import androidx.wear.compose.ui.tooling.preview.WearPreviewDevices diff --git a/compose-layout/src/main/java/com/google/android/horologist/compose/layout/AppScaffold.kt b/compose-layout/src/main/java/com/google/android/horologist/compose/layout/AppScaffold.kt index 4efaef0b10..cb281eba02 100644 --- a/compose-layout/src/main/java/com/google/android/horologist/compose/layout/AppScaffold.kt +++ b/compose-layout/src/main/java/com/google/android/horologist/compose/layout/AppScaffold.kt @@ -41,7 +41,7 @@ import androidx.wear.compose.navigation.SwipeDismissableNavHost @Composable fun AppScaffold( modifier: Modifier = Modifier, - timeText: @Composable () -> Unit = { TimeText() }, + timeText: @Composable () -> Unit = { ResponsiveTimeText() }, content: @Composable BoxScope.() -> Unit, ) { val scaffoldState = LocalScaffoldState.current.apply { diff --git a/compose-material/src/main/java/com/google/android/horologist/compose/material/ResponsiveTimeText.kt b/compose-layout/src/main/java/com/google/android/horologist/compose/layout/ResponsiveTimeText.kt similarity index 98% rename from compose-material/src/main/java/com/google/android/horologist/compose/material/ResponsiveTimeText.kt rename to compose-layout/src/main/java/com/google/android/horologist/compose/layout/ResponsiveTimeText.kt index 58f82d3b64..9780d75458 100644 --- a/compose-material/src/main/java/com/google/android/horologist/compose/material/ResponsiveTimeText.kt +++ b/compose-layout/src/main/java/com/google/android/horologist/compose/layout/ResponsiveTimeText.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.android.horologist.compose.material +package com.google.android.horologist.compose.layout import androidx.compose.foundation.layout.PaddingValues import androidx.compose.runtime.Composable diff --git a/compose-material/src/test/java/com/google/android/horologist/compose/material/ResponsiveTimeTextTest.kt b/compose-layout/src/test/java/com/google/android/horologist/compose/layout/ResponsiveTimeTextTest.kt similarity index 94% rename from compose-material/src/test/java/com/google/android/horologist/compose/material/ResponsiveTimeTextTest.kt rename to compose-layout/src/test/java/com/google/android/horologist/compose/layout/ResponsiveTimeTextTest.kt index 7acb62987f..d44e7bc5f4 100644 --- a/compose-material/src/test/java/com/google/android/horologist/compose/material/ResponsiveTimeTextTest.kt +++ b/compose-layout/src/test/java/com/google/android/horologist/compose/layout/ResponsiveTimeTextTest.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.android.horologist.compose.material +package com.google.android.horologist.compose.layout import com.google.android.horologist.screenshots.ScreenshotBaseTest import org.junit.Test diff --git a/compose-layout/src/test/snapshots/images/com.google.android.horologist.compose.layout_ResponsiveTimeTextTest_defaultTimeText.png b/compose-layout/src/test/snapshots/images/com.google.android.horologist.compose.layout_ResponsiveTimeTextTest_defaultTimeText.png new file mode 100644 index 0000000000..564af72a2a --- /dev/null +++ b/compose-layout/src/test/snapshots/images/com.google.android.horologist.compose.layout_ResponsiveTimeTextTest_defaultTimeText.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0acfdca65c8f367c190285c06c185af0b33477e439d1133ec67067862b44eeb +size 13194 diff --git a/compose-material/api/current.api b/compose-material/api/current.api index 0a98a0e4dc..69f71a466b 100644 --- a/compose-material/api/current.api +++ b/compose-material/api/current.api @@ -96,11 +96,6 @@ package com.google.android.horologist.compose.material { method @androidx.compose.runtime.Composable @com.google.android.horologist.annotations.ExperimentalHorologistApi public static void ResponsiveDialogContent(optional androidx.compose.ui.Modifier modifier, optional kotlin.jvm.functions.Function0? icon, optional kotlin.jvm.functions.Function0? title, optional kotlin.jvm.functions.Function0? message, optional kotlin.jvm.functions.Function0? onOk, optional kotlin.jvm.functions.Function0? onCancel, optional String okButtonContentDescription, optional String cancelButtonContentDescription, optional com.google.android.horologist.compose.layout.ScalingLazyColumnState state, optional boolean showPositionIndicator, optional kotlin.jvm.functions.Function1? content); } - public final class ResponsiveTimeTextKt { - method @androidx.compose.runtime.Composable public static void ResponsiveTimeText(optional androidx.compose.ui.Modifier modifier, optional androidx.wear.compose.material.TimeSource timeSource, optional androidx.compose.ui.text.TextStyle timeTextStyle, optional androidx.compose.foundation.layout.PaddingValues contentPadding, optional kotlin.jvm.functions.Function0? startLinearContent, optional kotlin.jvm.functions.Function1? startCurvedContent, optional kotlin.jvm.functions.Function0? endLinearContent, optional kotlin.jvm.functions.Function1? endCurvedContent, optional kotlin.jvm.functions.Function0 textLinearSeparator, optional kotlin.jvm.functions.Function1 textCurvedSeparator); - method @androidx.compose.runtime.Composable public static androidx.compose.foundation.layout.PaddingValues responsivePaddingDefaults(); - } - public final class SplitToggleChipKt { method @androidx.compose.runtime.Composable @com.google.android.horologist.annotations.ExperimentalHorologistApi public static void SplitToggleChip(boolean checked, kotlin.jvm.functions.Function1 onCheckedChanged, String label, kotlin.jvm.functions.Function0 onClick, com.google.android.horologist.compose.material.ToggleChipToggleControl toggleControl, optional androidx.compose.ui.Modifier modifier, optional String? secondaryLabel, optional androidx.wear.compose.material.SplitToggleChipColors colors, optional boolean enabled, optional androidx.compose.foundation.interaction.MutableInteractionSource checkedInteractionSource, optional androidx.compose.foundation.interaction.MutableInteractionSource clickInteractionSource); } diff --git a/compose-material/src/test/snapshots/images/com.google.android.horologist.compose.layout_ResponsiveTimeTextTest_defaultTimeText.png b/compose-material/src/test/snapshots/images/com.google.android.horologist.compose.layout_ResponsiveTimeTextTest_defaultTimeText.png new file mode 100644 index 0000000000..564af72a2a --- /dev/null +++ b/compose-material/src/test/snapshots/images/com.google.android.horologist.compose.layout_ResponsiveTimeTextTest_defaultTimeText.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0acfdca65c8f367c190285c06c185af0b33477e439d1133ec67067862b44eeb +size 13194