Skip to content
Prev Previous commit
Next Next commit
Merge branch 'dev_alpha06' into mv/crane_hilt
  • Loading branch information
Manuel Vivo committed Oct 23, 2020
commit c5bef7ec4852bf35cd7b3c8e19cf71a86f095454
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ class DatesLocalDataSource @Inject constructor() {
private val august2020 = CalendarMonth(
name = "August",
year = "2020",
numDays = 30,
numDays = 31,
monthNumber = 8,
startDayOfWeek = DayOfWeek.Saturday
)
private val september2020 = CalendarMonth(
name = "August",
name = "September",
year = "2020",
numDays = 31,
numDays = 30,
monthNumber = 9,
startDayOfWeek = DayOfWeek.Tuesday
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ private fun MainContent(

enum class SplashState { Shown, Completed }

private val splashAlphaKey = FloatPropKey()
private val contentAlphaKey = FloatPropKey()
private val contentTopPaddingKey = DpPropKey()
private val splashAlphaKey = FloatPropKey("Splash alpha")
private val contentAlphaKey = FloatPropKey("Content alpha")
private val contentTopPaddingKey = DpPropKey("Top padding")

private val splashTransitionDefinition = transitionDefinition<SplashState> {
state(SplashState.Shown) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ import androidx.compose.samples.crane.base.CraneEditableUserInput
import androidx.compose.samples.crane.base.CraneUserInput
import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Invalid
import androidx.compose.samples.crane.home.PeopleUserInputAnimationState.Valid
import androidx.compose.samples.crane.ui.CraneTheme
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.ui.tooling.preview.Preview

class PeopleUserInputState {
var people by mutableStateOf(1)
Expand Down Expand Up @@ -120,7 +122,15 @@ fun DatesUserInput(datesSelected: String, onDateSelectionClicked: () -> Unit) {
)
}

private val tintKey = ColorPropKey()
@Preview
@Composable
fun PeopleUserInputPreview() {
CraneTheme {
PeopleUserInput(onPeopleChanged = {})
}
}

private val tintKey = ColorPropKey(label = "tint")

enum class PeopleUserInputAnimationState { Valid, Invalid }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ private fun ChoiceChipContent(
}
}

private val Alpha = FloatPropKey()
private val Offset = FloatPropKey()
private val Alpha = FloatPropKey("alpha")
private val Offset = FloatPropKey("offset")

@Composable
private fun getChoiceChipTransitionDefinition(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ private fun IconAndTextRow(
}
}

private val FabWidthFactor = FloatPropKey()
private val TextOpacity = FloatPropKey()
private val FabWidthFactor = FloatPropKey("Width")
private val TextOpacity = FloatPropKey("Text Opacity")

private enum class ExpandableFabStates { Collapsed, Extended }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import androidx.compose.ui.unit.dp
import androidx.ui.tooling.preview.Preview
import com.example.compose.jetchat.R

private val bottomOffset = DpPropKey()
private val bottomOffset = DpPropKey("Bottom Offset")

private val definition = transitionDefinition<Visibility> {
state(Visibility.GONE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,11 @@ fun ConvPreview480MeDefault() {
ProfileScreen(colleagueProfile)
}
}

@Preview
@Composable
fun ProfileFabPreview() {
JetchatTheme {
ProfileFab(extended = true, userIsMe = false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ private fun TopicsGrid(modifier: Modifier = Modifier) {

private enum class SelectionState { Unselected, Selected }

private val CornerRadius = DpPropKey()
private val SelectedAlpha = FloatPropKey()
private val CheckScale = FloatPropKey()
private val CornerRadius = DpPropKey("Corner Radius")
private val SelectedAlpha = FloatPropKey("Selected Alpha")
private val CheckScale = FloatPropKey("Check Scale")

private val TopicSelect = transitionDefinition<SelectionState> {
state(SelectionState.Selected) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import androidx.compose.ui.platform.DensityAmbient
import androidx.compose.ui.unit.dp

private const val DividerLengthInDegrees = 1.8f
private val AngleOffset = FloatPropKey()
private val Shift = FloatPropKey()
private val AngleOffset = FloatPropKey("angle")
private val Shift = FloatPropKey("shift")

/**
* A donut chart that animates when loaded.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.