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
8 files changed +32
-14
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,9 @@ private fun MainContent(
95
95
96
96
enum class SplashState { Shown , Completed }
97
97
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 " )
101
101
102
102
private val splashTransitionDefinition = transitionDefinition<SplashState > {
103
103
state(SplashState .Shown ) {
Original file line number Diff line number Diff line change @@ -35,8 +35,10 @@ import androidx.compose.samples.crane.base.CraneUserInput
35
35
import androidx.compose.samples.crane.base.ServiceLocator
36
36
import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Invalid
37
37
import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Valid
38
+ import androidx.compose.samples.crane.ui.CraneTheme
38
39
import androidx.compose.ui.Modifier
39
40
import androidx.compose.ui.graphics.Color
41
+ import androidx.ui.tooling.preview.Preview
40
42
41
43
class PeopleUserInputState {
42
44
var people by mutableStateOf(1 )
@@ -122,7 +124,15 @@ fun DatesUserInput(onDateSelectionClicked: () -> Unit) {
122
124
)
123
125
}
124
126
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" )
126
136
127
137
enum class PeopleUserInputAnimationState { Valid , Invalid }
128
138
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ private fun ChoiceChipContent(
177
177
}
178
178
}
179
179
180
- private val Alpha = FloatPropKey ()
181
- private val Offset = FloatPropKey ()
180
+ private val Alpha = FloatPropKey (" alpha " )
181
+ private val Offset = FloatPropKey (" offset " )
182
182
183
183
@Composable
184
184
private fun getChoiceChipTransitionDefinition (
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ private fun IconAndTextRow(
106
106
}
107
107
}
108
108
109
- private val FabWidthFactor = FloatPropKey ()
110
- private val TextOpacity = FloatPropKey ()
109
+ private val FabWidthFactor = FloatPropKey (" Width " )
110
+ private val TextOpacity = FloatPropKey (" Text Opacity " )
111
111
112
112
private enum class ExpandableFabStates { Collapsed , Extended }
113
113
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import androidx.compose.ui.unit.dp
34
34
import androidx.ui.tooling.preview.Preview
35
35
import com.example.compose.jetchat.R
36
36
37
- private val bottomOffset = DpPropKey ()
37
+ private val bottomOffset = DpPropKey (" Bottom Offset " )
38
38
39
39
private val definition = transitionDefinition<Visibility > {
40
40
state(Visibility .GONE ) {
Original file line number Diff line number Diff line change @@ -273,3 +273,11 @@ fun ConvPreview480MeDefault() {
273
273
ProfileScreen (colleagueProfile)
274
274
}
275
275
}
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) {
155
155
156
156
private enum class SelectionState { Unselected , Selected }
157
157
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 " )
161
161
162
162
private val TopicSelect = transitionDefinition<SelectionState > {
163
163
state(SelectionState .Selected ) {
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ import androidx.compose.ui.platform.DensityAmbient
33
33
import androidx.compose.ui.unit.dp
34
34
35
35
private 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 " )
38
38
39
39
/* *
40
40
* A donut chart that animates when loaded.
You can’t perform that action at this time.
0 commit comments