Skip to content

Instantly share code, notes, and snippets.

@mitchtabian
Last active April 9, 2021 12:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchtabian/f1327d392e3c0ab9ac416c91204c329b to your computer and use it in GitHub Desktop.
Save mitchtabian/f1327d392e3c0ab9ac416c91204c329b to your computer and use it in GitHub Desktop.

Updates for the Food2ForkCompose app from alpha-11 to beta01.

Versions

  1. kotlin -> 1.4.30
    • Make sure Kotlin is updated to early version
    • Settings > Languages and Frameworks > Kotlin > Early Access Preview 1.4.x
  2. kotlin_compiler_extension -> 1.0.0-beta01
  3. compose -> 1.0.0-beta01 (from alpha11)
  4. navigation-compose -> 1.0.0-alpha08 (from alpha06)
  5. Add const val compose_constraint = "1.0.0-alpha03"
    • androidx.compose.foundation.layout.ConstraintLayout was deprecated in favor of androidx.constraintlayout.compose.ConstraintLayout
  6. Add const val compose_activity = "1.3.0-alpha03"
    • androidx.activity:activity-compose:1.3.0-alpha03 is released and is only compatible with compose beta01.

Dependencies

  1. Add androidx.constraintlayout:constraintlayout-compose:${Versions.compose_constraint}
  2. Add androidx.activity:activity-compose:${Versions.compose_activity}

Class updates

  1. MainActivity
    1. New import for viewModel() builder function (import androidx.lifecycle.viewmodel.compose.viewModel
    2. AmbientContext -> LocalContext
    3. setContent has new import (import androidx.activity.compose.setContent)
  2. CircularIndeterminateProgressBar
    1. imports
  3. DefaultSnackbar
    1. Snackbar has changed. text field renamed to content
  4. LoadingRecipeListShimmer
    1. AmbientDensity -> LocalDensity
  5. LoadingRecipeShimmer
    1. preferredSize is deprecated. Replace with height
  6. NothingHere
    1. fontSize = 55.sp
  7. RecipeCard
    1. preferredSize is deprecated. Replace with height
  8. RecipeView
    1. preferredSize is deprecated. Replace with height
  9. SearchAppBar
    1. TextField
      1. new colors attribute (backgroundColor deprecated)
      2. onImeActionPerformed deprecated
        • Replaced with keyboardActions
  10. Keyboard
    1. SoftwareKeyboardController exists now
  11. ShimmerRecipeCardItem
    1. preferredSize -> height
  12. Theme
    1. Experimental annotation
  13. RecipeDetailScreen
    1. Experimental annotation
  14. ImageUtils
    1. AmbientContext -> LocalContext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment