Explicación de ViewModel Factory – Componente de arquitectura de Android | Ejercicio



🏆 Mis cursos en línea ⭐ Cupón de descuento: LAUNCH-STEVDZA-SAN 🐱‍👤 ¿Quieres ser miembro? ¡Articulación! 📸 Plantilla de método de fábrica de Instagram es una plantilla de diseño creativo que utiliza métodos de fábrica para crear elementos. Un método de fábrica es un método que devuelve una instancia de la misma clase. Y en este video aprenderá cómo pasar argumentos a su ViewModel usando el método ViewModelProvider.Factory. // Implementación de la dependencia de ViewModel “androidx.lifecycle: lifecycle-viewmodel-ktx: 2.2.0”

Compruebe también

Desarrollo de aplicaciones web móviles (Android studio)

Mi primera aplicación.. Aplicación móvil de restaurante.

26 comentarios

  1. You made it so easy ,thx a lot ❤️

  2. This doesn't explain anything to understand factory pattern.

  3. Sir please make a video of ViewmodelProvider.Factory class With Multiple Fragments

  4. Sir please make a video of ViewmodelProvider.Factory class With Multiple Fragments

  5. Sir please make a video of ViewmodelProvider.Factory class With Multiple Fragments

  6. Sir please make a video of ViewmodelProvider.Factory class With Multiple Fragments

  7. Sir please make a video of ViewmodelProvider.Factory class With Multiple Fragments

  8. You do a wonderful job explaining these concepts! I was confused for the longest time how these android architecture components worked together, but these videos are super enjoyable and the concepts are simplified so well I wish I had seen these sooner!

  9. I want to pass a new string every time the user clicks the button. but it only takes the first string only, after the ViewModelFactory is not called, so the value is not updated. ANY HELP, please.

  10. Stevdza-san could you explain what for is this line: @Suppress("UNCHECKED_CAST")

  11. Thanks for the Video, Can you suggest any other use-cases of this ViewModel factory Method?

  12. This might be obvious to many but I am still learning. My question why use parameters in the ViewModel class that will make you have to pass the arguments using the factory? Why not just initialize them in the ViewModel class? What are the advantages of using a ViewModel Factory?

  13. How to prevent that Suppress Warning and wht is the best way to do withour Suppressing it?

  14. nice video.
    any other reason for using viewmodel factory ?

    because i could createa method passing a paremeter inside viewmodel.

  15. u explained very well

  16. can we use this with androidviewmodel ?

  17. what about the viewModels() delegate in Fragment? how can use the factory inside this function???

  18. Why in the god damn shit do I have to create a factory with 5 lines of long ass code just so I can pass a single argument on the ViewModel, such a verbose SDK. Nice tutorial btw but man android dev is such a pain in the ass.

  19. I want to use data binding in 3 fragments and to have the same ViewModel can this help?

  20. This video made me subscribe.

    You just cleared my confusion.

  21. Really great video series. Thanks!

  22. NIie explanation. This is a well worked video!

  23. super helpful video, tks so much, can u make a page on Facebook share knowledge?

  24. Very good and successful explanation. And thank you for keeping paces with the time by using Kotlin.

  25. Why not java🥺

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *