Android ROOM Database | ViewModel, LiveData, RecyclerView Tutorial using Kotlin

Поделиться
HTML-код
  • Опубликовано: 12 авг 2020
  • Other videos Links:
    • Android First App | Ba...
    GitHub Code link:
    github.com/ravizworldz/RoomDb...
    How to install android studio
    • How to install Android...
    Android ROOM DB Migration
    • Android Room DB Migrat...
    Android ROOM Database Integration
    • Android ROOM Database ...
    Full Course MVVM, Retrofit2, RecyclerView, GLIDE
    • FULL COURSE ANDROID -...
    Android MVVM(Model-View-View-Model) , Live Data
    • Android Model View Vie...
    Android Retrofit2, Glide, JSO, Github Api, Recyclerview
    • Android Retrofit2 and ...
    Android RecyclerView Kotlin
    • Android RecyclerView |...
    Inline error messages and how to pass data from one activity to another activity in Kotlin
    • Android Login Screen w...
    Android basic login screen
    • Android First App | Ba...
    Interview Question
    • Android Interview Ques...
    • Android Interview Ques...
    • Android Interview Ques...
    #room #mvvm #viewmodel #livedata #observers #recyclerview #retrofit #retrofit2 #glide #gson #network #api #github #githubapi #recyclerview #customrecyclerview #recyclerviewadapter #adapter #androidinterview #android #howto #androidlearning #kotlin #basicskotlin #inline error #passdata #activity #corona #tutorial #example #login #learn #androidstudio #basicandroid #databse #kotlin android #mvvm android #retrofit2 android #room android #kotlin tutorial

Комментарии • 65

  • @theleftbehind77
    @theleftbehind77 3 года назад +4

    Thank you very much, your video helped me a lot!
    You could talk a bit louder and clearer but the code quality is excellent and easy to understand.

  • @angelamariasuarezparra7872
    @angelamariasuarezparra7872 3 года назад +2

    You are my favorite youtuber, thank youuuu so much

  • @israfilcc
    @israfilcc 3 года назад +1

    You saved my life bro I have tried for 4 days and I found it thanks...

    • @LearningWorldz
      @LearningWorldz  3 года назад +1

      Glad I could help, Thanks for your feedback!

  • @kamnashukla6773
    @kamnashukla6773 3 года назад +3

    very helpful..thnks:)

  • @yusuffadhillah2977
    @yusuffadhillah2977 2 года назад +1

    thankyou its still working

  • @mkshis3880
    @mkshis3880 3 года назад +2

    Very helpful video

  • @fashionatyourstep3860
    @fashionatyourstep3860 2 года назад +1

    Very helpful

  • @mahnazmahmoudi8394
    @mahnazmahmoudi8394 3 года назад +1

    Thanks
    Very Good

  • @user-hr6gh9us4s
    @user-hr6gh9us4s 2 года назад +1

    thanks from japan.
    your movie is very useful to me
    thank you very much
    my english is very poor,sorry

    • @LearningWorldz
      @LearningWorldz  2 года назад

      Great to hear that, Thank you so much for your feedback!

  • @dkmarwat5806
    @dkmarwat5806 3 года назад +2

    Very Helpful

  • @fozyum
    @fozyum Год назад

    Hello, thanks for the content. There is something I want to ask, I keep the name and date information with Room in the project I am working on, at the same time I want to keep a name and ArrayList in a different part of the program. To do this, should I add all the classes and the new interface to the project again, using the database I created. how can i keep them

    • @LearningWorldz
      @LearningWorldz  Год назад

      I have already a video available which is exact match of your requirement. take a look, here is the link. let me know if you still have any question.
      ruclips.net/video/a_zcPmwRc_A/видео.html

  • @manish4686
    @manish4686 3 года назад +2

    Hello!! how to update data using another activity?
    Can you help me out...!

    • @LearningWorldz
      @LearningWorldz  3 года назад +2

      You can call same @update function of Dao from view model of your activity. Thanks!

  • @danealbrain337
    @danealbrain337 2 года назад

    i have on error will anyone help me ?
    error in mainactivity.kt viewModel = ViewModelProviders.of(this)
    ViewModelProviders is in red line and cant solve problem error is Unresolved reference: tvName

    • @LearningWorldz
      @LearningWorldz  2 года назад

      I think your import is not proper. take a look to my code and match it with yours.
      github.com/ravizworldz

  • @ravipandya4649
    @ravipandya4649 3 года назад

    Amazing tutorial...Thank you! But your keyboard's sound is louder than your voice.

    • @LearningWorldz
      @LearningWorldz  3 года назад +1

      Thanks for your feedback, thats improved in the latest videos, Hope that help!

  • @SonuKumar-px9dy
    @SonuKumar-px9dy 2 года назад +1

    brother how to store images in Room database plz help try from last one week

    • @LearningWorldz
      @LearningWorldz  2 года назад +2

      There are many ways to store image but below 3 are commonly used.
      1. You can store image URL in room db and then use that URL with Gllide to display image.
      2. You can try to store image byte array in db then convert it back to bitmap to display.
      3. Store image in the internal memory and display it from there.

  • @dxy8234
    @dxy8234 3 года назад +3

    hi, your code is easy to understand .. but after watching and practicing then matching it with your github code, everything becomes a lot of trouble

    • @LearningWorldz
      @LearningWorldz  3 года назад +2

      sorry to hear that, you can download github code and just run it and see if it work. I assume there is something wrong with AS gradle.

    • @dxy8234
      @dxy8234 3 года назад +3

      @@LearningWorldz I mean there is a difference in the code on Github and the video from RUclips

  • @logexp1632
    @logexp1632 3 года назад

    Hi, perfect, one question. Can be this recyclerview drag&dropable? thank you

    • @LearningWorldz
      @LearningWorldz  3 года назад

      Yes, absolutely you can implement drag and drop on recyclerview.

    • @Pillottek
      @Pillottek 3 года назад

      Well, maybe I'll need a little help. In Main activity I created lateinit var allUsers: Arraylist... in OnCreate I initiated it with allUsers = recyclerViewAdapter.items... finally passed allUsers to Collections.swap(allUsers... The app keeps crashing with IndexOutOfBoundsException in line with Collections. I hope I'm doing something wrong. If you can help, please

  • @connorholm2859
    @connorholm2859 3 года назад

    Great vid! Is there a way to do this in a fragment rather than an activity?

    • @LearningWorldz
      @LearningWorldz  3 года назад

      Yes, you can do the same in fragment instead of activity, simply register the viewmodel in fragment and then call viewmodel functions from fragment, Hope that help!

  • @smag21
    @smag21 3 года назад

    adding kapt dependency crashes my project, says Execution failed for task ':app:kaptDebugKotlin'

    • @LearningWorldz
      @LearningWorldz  3 года назад

      Add below line at the top of your build.gradle file inside plugin block.
      apply plugin: 'kotlin-kapt'
      Below lines inside your dependencies block:
      kapt 'androidx.room:room-compiler:2.4.0-alpha02'
      implementation 'androidx.room:room-runtime:2.4.0-alpha02'

    • @smag21
      @smag21 3 года назад

      @@LearningWorldz Now I get another error though..
      "error: getRequiredAutoMigrationSpecs() in RoomDb_Impl cannot override getRequiredAutoMigrationSpecs() in RoomDatabase
      protected Set

    • @LearningWorldz
      @LearningWorldz  3 года назад

      you just need to uninstall and reinstall the app. that will resolve this issue.

  • @diymicha4905
    @diymicha4905 3 года назад +3

    I can hear keys clacking, but I only hear mumbling... :(

    • @LearningWorldz
      @LearningWorldz  3 года назад +1

      Thanks for your feedback, will take care in future videos!

  • @sgupta519
    @sgupta519 Год назад

    Hello is this MVVM structure ? Thanks

  • @nexgen.graphics
    @nexgen.graphics 3 года назад +1

    Great tutorial. But I can't see a repository class 🙄🤷‍♂️. Is that optional?

    • @LearningWorldz
      @LearningWorldz  3 года назад +2

      Repository should be created for re-usability purpose. Thanks!

    • @nexgen.graphics
      @nexgen.graphics 3 года назад

      ​@@LearningWorldz Thanks for the swift reply :) . So I can skip that one for simple projects?

    • @LearningWorldz
      @LearningWorldz  3 года назад +2

      yes you can..Thanks!

  • @akotbenjaminawanda4446
    @akotbenjaminawanda4446 2 года назад

    Hi, when I run it, it says "RoomDemo has stopped."

    • @LearningWorldz
      @LearningWorldz  2 года назад +1

      Check the logcat and see what error you are getting?
      also try to uninstall and reinstall might work.

    • @akotbenjaminawanda4446
      @akotbenjaminawanda4446 2 года назад

      @@LearningWorldz, thanks a lot bro. Mine has worked. Your tutorial has saved my Master's project.

  • @ghanshyamgupta8407
    @ghanshyamgupta8407 3 года назад +2

    What about the fast forwarding 🙄🤔

  • @aliabibi7074
    @aliabibi7074 2 года назад

    Hi, I follow all your steps and watch your video 2 times, but still can't get data in a recycler view. Plzzz help me and guide me that how can I get data in a recycler view...I'll be thankful to u

    • @LearningWorldz
      @LearningWorldz  2 года назад

      please let me know if you are getting any error ? check the logcat for errors. or you can print logs in the logcat when making a call to Query function. you can send me the code snnipet here so that I can take a look, please share the viewmodel code.

    • @aliabibi7074
      @aliabibi7074 2 года назад

      @@LearningWorldz App is installed successfully,but I don't know that data is inserted or not,Because I cant't get data in a recyclerview. I used logcat after calling to Query function, but there is no data or any error in my code, Tell me how can I send you ViewModel code??

    • @LearningWorldz
      @LearningWorldz  2 года назад

      you can paste code here..
      share the viewmodel code and activity code when you are calling insert and query function.

    • @aliabibi7074
      @aliabibi7074 2 года назад

      @@LearningWorldz I resolved my problem, Thank u so much for cooperating and giving me a time

    • @LearningWorldz
      @LearningWorldz  2 года назад

      Awesome!

  • @muhammedafsalm7512
    @muhammedafsalm7512 2 года назад

    The voice is not good use a better mic or other solutions to get a better voice .

    • @LearningWorldz
      @LearningWorldz  2 года назад

      Thanks for the feedback!

    • @maresolaris
      @maresolaris 2 года назад

      I really enjoyed your loud voice in your tutorial, Muhammed Afsal...