Tutorial de la aplicación Kotlin Andriod MVVM CURD: Room + Coroutines + DataBinding + LiveData + ViewModel

Echa un vistazo a mi curso más vendido “The Complete Android Jetpack Bootcamp 2021” en Udemy. Solo $ 9,99. Esta oferta finaliza en 4 días. 30 horas de tutoriales avanzados de desarrollo de Android, ejemplos de código y más con una garantía de devolución de dinero de 30 días. Android Jetpack, Clean Architecture, Dagger, Retrofit, Coroutines, .. Todo en un solo curso. ************************************************ ********************************************** ** ************************************************ ******************************************* Revisa mi “The Complete la clase magistral de desarrollo de RxJava para Android “en Udemy. Creamos una aplicación CRUD de Kotlin para Android a medida que aprendemos los componentes de la arquitectura de Android (persistencia de datos de habitación, ViewModel, LiveData, DataBinding) y las Coroutines. ************************************************ ************************************************ ** Descargue el enlace del proyecto de código final y lea el tutorial completo actualizado. ************************************************ ************************************************ ** Tutorial de Android WorkManager (Kotlin): Tutorial para principiantes Kotlin Coroutines: Actualización con Kotlin Coroutines Tutorial: Tutorial de notificaciones (Kotlin): ********************** * *********************************************** * **************************** Configuración del proyecto: 0:06 Crear clases de entidad para la sala: 5:17 Interfaz de acceso a datos Objeto (DAO ): 9:56 Clase de base de datos de sala: 20:23 Crear un repositorio: 28:01 Crear vista: 31:46 Ver clase de modelo y sus cambios: 38:05 Ver clase de fábrica de modelos: 49:18 Implementar funciones de MainActivity: 50:23 RecyclerView y funciones relacionadas: 57:31 Ver mensajes en MVVM: 1:23:11 Comprobaciones: 1:30:02 Validaciones: 1:37:53 Mejorar RecyclerView: 1:42:33 ***** Les deseo a todos el éxito * *****.

About MiReal

Compruebe también

Cómo ser un buen desarrollador de software | Cruce

En este video te explicaremos cómo puedes convertirte en un buen programador. Puntos clave: 01:30 …

38 comentarios

  1. Great sir thanks a lot.
    Your channel needs more recognition, you are a great teacher.

  2. Thanks for valuable lessons.Please adding dependency injection in this projects….

  3. If anyone serious about learning Kotlin MVVM with best practices, this is the best live coding session video I recommend! Thanks to the author for such an useful explanation.

  4. Bro this tutorial is awesome. I hope the practices are not yet old, since it seems to change every month =)

  5. def lifecycle_version = "2.4.0-alpha02"

    def room_version = "2.3.0"

    // ViewModel

    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"

    // LiveData

    implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"

    // Annotation processor

    kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"

    implementation "androidx.room:room-runtime:$room_version"

    kapt "androidx.room:room-compiler:$room_version"

    // Kotlin Extensions and Coroutines support for Room


    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0'

    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'

  6. Hi thanks for the tutorial but won't we be needing an Application class

  7. That's what we called a proper tutorial video.. you are awesome buddy.. Please make a tutorial on KMM also.

  8. You are good,, please add a tutorial for kotlin cross platform also.

  9. Awsome mate. This was the best tutorial of MVVM

  10. Please kindly explain the saveOrUpdate method (48:25)
    val name = inputName.value!!
    val email = inputEmail.value!!
    The above code means name and email has a value
    But the code below, does it mean we are removing the value
    inputName.value = null
    inputEmail.value = null

  11. I just bought your course on Udemy, really satisfied with your teaching, slow and steady. Thanks for the verifications you did on ROOM, it all made sense.

  12. Awesome tutorial.
    I read the comments and there were some issues around the 50 minute mark (Kapt issue something something).
    This issue can be solved using the following:
    1. in your gradle, do the following instead of what's in the video.
    This is if you have older gradle version:

    dataBinding true

    2. A friend of mine followed the tutorial as well, and he copied wrongly.
    Basically, try to copy/follow all the things correctly.
    This friend of mine miscopied the activity main file. So this is an instance of a miscopied code
    simply remove the equal sign (=) on the android:onClick="@…."
    from this:
    to this:
    Maybe you have the same issue.

  13. Thanks for explaining the concepts with so much ease ♥️

  14. Esta demás de bueno, ahora le voy a meter retrofit (Para llamadas asíncronas), tengo un replicado r de base de datos en java , ahora lo estoy actualizando, te felicito

  15. Really understandable … thank you…

  16. Hi! I implemented your solution and it works! Thanks a lot! I did not do the databinding part for now because I don't need it in my app. However I want to save info to the Room Database from inside a BroadcastReceiver class (so not an Activity or Fragment). I try to instantiate everything like you show in the video:

    val myDao: MyDao = MyDatabase.getDatabaseInstance(application).myDao

    val repository = MyRepository(myDao)

    val factory = MyViewModelFactory(repository)

    The problem is that in the first line of code, the term application is red and I get "Unresolved reference: application" and am asked to "Create object 'aplication'".

    How do I solve this?

    Thanks in advance!


  18. Bravo! Would make me take a course from you

  19. Thank YOU for the lesson. I think the end was a bit confusing to understand (although you explained very well). I didn't know we could just update the list and maintain only one adapter instance throughout the whole process. That was very smart.

  20. This is one of the best tutorial available on internet for android and MVVM ❤️

  21. I got these kind of error while running in my phone.
    Execution failed for task ':app:kaptDebugKotlin'.

    > A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

    > java.lang.reflect.InvocationTargetException (no error message)

    please attached solution for this. thankyou

  22. do you have tutorial content provider using room database kotlin sir?

  23. you are my job savior..
    i also purchased your course in udemy..
    Keep growing keep rocking

  24. I think the singleton implementation in around minute 23 is wrong. Because the static variable INSTANCE is never reassigned. So a call to the getInstance() method will always instantiate a new Room Database.

  25. i find now my channel … really you are the best one

  26. great tutorial !! I followed used it in my project but while building the project , i am getting
    " Cannot find a getter for <com.google.android.material.textfield.TextInputEditText android.text> that accepts parameter type 'java.lang.String'
    error: cannot find symbol import com.example.myhealth.databinding.ActivityRegistrationBindingImpl;error

    I simply cant resolve it.

  27. very good!
    i am confused…
    pls explain why add and use Event class ??

  28. Which theme has been applied in Android Studio? Its super cool theme.

  29. Sir, the download link is not working

  30. How to set EditText hint from View Model?

  31. Just finished the "Create a repository" part. Not sure if this gets answered in some way later but do we make a repository for every dao or is it one repository? Also thanks for this video, it is super helpful!

  32. link doesnt work

  33. Can you please make a tutorial on how to handle progress loaders in MVVM architecture.

  34. Excellent tutorial. Thanks 🙂

  35. help me T___T

    A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution

  36. There is 1 issue:- if immediately click on update and then save button, very fast click then an empty card added in the list even checking the inputName.value!=null && inputEmail.value!= null

    in the update method setting
    inputName.value =null
    inputEmail.value = null

    this issues is coming only when fast click of button from update to save. LiveData setting and getting value is not synchronous that why it causing problem ? How to fix it ?

Deja una respuesta

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