File tree Expand file tree Collapse file tree 8 files changed +32
-14
lines changed
Crane/app/src/main/java/androidx/compose/samples/crane/home
Jetcaster/app/src/main/java/com/example/jetcaster/ui/home/discover
Jetchat/app/src/main/java/com/example/compose/jetchat
Owl/app/src/main/java/com/example/owl/ui/onboarding
Rally/app/src/main/java/com/example/compose/rally/ui/components Expand file tree Collapse file tree 8 files changed +32
-14
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,9 @@ private fun MainContent(
9595
9696enum class SplashState { Shown , Completed }
9797
98- private val splashAlphaKey = FloatPropKey ()
99- private val contentAlphaKey = FloatPropKey ()
100- private val contentTopPaddingKey = DpPropKey ()
98+ private val splashAlphaKey = FloatPropKey (" Splash alpha " )
99+ private val contentAlphaKey = FloatPropKey (" Content alpha " )
100+ private val contentTopPaddingKey = DpPropKey (" Top padding " )
101101
102102private val splashTransitionDefinition = transitionDefinition<SplashState > {
103103 state(SplashState .Shown ) {
Original file line number Diff line number Diff line change @@ -35,8 +35,10 @@ import androidx.compose.samples.crane.base.CraneUserInput
3535import androidx.compose.samples.crane.base.ServiceLocator
3636import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Invalid
3737import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Valid
38+ import androidx.compose.samples.crane.ui.CraneTheme
3839import androidx.compose.ui.Modifier
3940import androidx.compose.ui.graphics.Color
41+ import androidx.ui.tooling.preview.Preview
4042
4143class PeopleUserInputState {
4244 var people by mutableStateOf(1 )
@@ -122,7 +124,15 @@ fun DatesUserInput(onDateSelectionClicked: () -> Unit) {
122124 )
123125}
124126
125- private val tintKey = ColorPropKey ()
127+ @Preview
128+ @Composable
129+ fun PeopleUserInputPreview () {
130+ CraneTheme {
131+ PeopleUserInput (onPeopleChanged = {})
132+ }
133+ }
134+
135+ private val tintKey = ColorPropKey (label = " tint" )
126136
127137enum class PeopleUserInputAnimationState { Valid , Invalid }
128138
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ private fun ChoiceChipContent(
177177 }
178178}
179179
180- private val Alpha = FloatPropKey ()
181- private val Offset = FloatPropKey ()
180+ private val Alpha = FloatPropKey (" alpha " )
181+ private val Offset = FloatPropKey (" offset " )
182182
183183@Composable
184184private fun getChoiceChipTransitionDefinition (
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ private fun IconAndTextRow(
106106 }
107107}
108108
109- private val FabWidthFactor = FloatPropKey ()
110- private val TextOpacity = FloatPropKey ()
109+ private val FabWidthFactor = FloatPropKey (" Width " )
110+ private val TextOpacity = FloatPropKey (" Text Opacity " )
111111
112112private enum class ExpandableFabStates { Collapsed , Extended }
113113
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import androidx.compose.ui.unit.dp
3434import androidx.ui.tooling.preview.Preview
3535import com.example.compose.jetchat.R
3636
37- private val bottomOffset = DpPropKey ()
37+ private val bottomOffset = DpPropKey (" Bottom Offset " )
3838
3939private val definition = transitionDefinition<Visibility > {
4040 state(Visibility .GONE ) {
Original file line number Diff line number Diff line change @@ -273,3 +273,11 @@ fun ConvPreview480MeDefault() {
273273 ProfileScreen (colleagueProfile)
274274 }
275275}
276+
277+ @Preview
278+ @Composable
279+ fun ProfileFabPreview () {
280+ JetchatTheme {
281+ ProfileFab (extended = true , userIsMe = false )
282+ }
283+ }
Original file line number Diff line number Diff line change @@ -155,9 +155,9 @@ private fun TopicsGrid(modifier: Modifier = Modifier) {
155155
156156private enum class SelectionState { Unselected , Selected }
157157
158- private val CornerRadius = DpPropKey ()
159- private val SelectedAlpha = FloatPropKey ()
160- private val CheckScale = FloatPropKey ()
158+ private val CornerRadius = DpPropKey (" Corner Radius " )
159+ private val SelectedAlpha = FloatPropKey (" Selected Alpha " )
160+ private val CheckScale = FloatPropKey (" Check Scale " )
161161
162162private val TopicSelect = transitionDefinition<SelectionState > {
163163 state(SelectionState .Selected ) {
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ import androidx.compose.ui.platform.DensityAmbient
3333import androidx.compose.ui.unit.dp
3434
3535private const val DividerLengthInDegrees = 1.8f
36- private val AngleOffset = FloatPropKey ()
37- private val Shift = FloatPropKey ()
36+ private val AngleOffset = FloatPropKey (" angle " )
37+ private val Shift = FloatPropKey (" shift " )
3838
3939/* *
4040 * A donut chart that animates when loaded.
You can’t perform that action at this time.
0 commit comments