ViewModel Explained - Android Architecture Component | Tutorial

Поділитися
Вставка
  • Опубліковано 22 лис 2024

КОМЕНТАРІ • 152

  • @ben6
    @ben6 4 роки тому +39

    Wow, this is so modern! Finally a video that feels from 2020

  • @TheDamiankain
    @TheDamiankain 2 роки тому +5

    That feeling when a foreigner explains in a shorter and clearer way than compatriots. Thank you, this is the shortest and most understandable video on the viewmodel that I have seen!!!!!

  • @mahmoudbasha516
    @mahmoudbasha516 4 роки тому +66

    Man you're good in this teaching stuff !! If everyone trying to explain something is organized, straight to the point, covering the whole subject as you the world would have been a much better place.
    Thank you and please go on with this art you're creating

    • @StevdzaSan
      @StevdzaSan  4 роки тому +5

      Thank you for your kind words, I really appreciate that

  • @faboxbkn
    @faboxbkn 2 роки тому +1

    Man I have been struggling to find a short video straight to the point! excellent nice explained. 10/10

  • @silentassassin7472
    @silentassassin7472 3 роки тому +1

    Most modern android tutorial..plz keep making them

  • @anb4351
    @anb4351 Рік тому

    Thanks man now I will never get confuses on what is ViewModel

  • @theMajesticMJ
    @theMajesticMJ 4 роки тому +1

    Thank you very much. you don't have any idea that how helpful your tutorials have been for me in last few months.

  • @freddygoudou801
    @freddygoudou801 4 роки тому +3

    Il n'y a pas plus simple façon d'expliquer. Love this tutorial!

  • @gesit7120
    @gesit7120 4 роки тому +7

    Good short easy to understand tutorial, keep your work up👍

  • @davidgreenwitch
    @davidgreenwitch 2 роки тому +2

    Thanks. Short and precise. Just what I needed.

  • @chriscampbell5901
    @chriscampbell5901 4 роки тому

    Thanks for not over complicating this subject.

  • @chunkies839
    @chunkies839 3 роки тому +7

    so its just a seperate class where all the logic takes place while the main activity is just there to facilitate displaying information correctly?

  • @solidlucho1
    @solidlucho1 3 роки тому

    Thank you!! , I was chewing and watching tutorials, and this video was the one that could open the picture for me

  • @donnfelkeryt
    @donnfelkeryt 2 роки тому +1

    Excellent tutorial. Short, succinct and to the point. Well done.👏

  • @xaviersoh
    @xaviersoh 2 роки тому

    Welle explained, straight to the point . I don't understand english very well but here averything is clear

  • @rinkup2639
    @rinkup2639 Рік тому

    Videos are concise, to the point and relevant

  • @EBRAHIMAHMEDNASSERALNATEH
    @EBRAHIMAHMEDNASSERALNATEH 4 роки тому +1

    A lesson in how to retrieve data to RecyclerView from Firebase database can be done and arranged according to the higher value or the higher price.

  • @iamskyhorse
    @iamskyhorse 3 роки тому +1

    Thank you. The best tutorial I have seen. You have good teaching skill how to use simple example to transfer the knowledge to students effectively.

  • @user-my6yf1st8z
    @user-my6yf1st8z Рік тому +3

    2:06 how does he find button and text views without findViewById or viewbinding?

  • @a-zlearning6259
    @a-zlearning6259 9 місяців тому

    Thank you. Your explanation is clear and easy to understand!

  • @raunakkumar6144
    @raunakkumar6144 2 роки тому +1

    Thanks man , loved your explanation.

  • @ayoseunsolomon2562
    @ayoseunsolomon2562 3 роки тому +1

    Thank you so much, so simple and powerful, learning shouldn't be ambiguous, thank you so much for making this so simple

    • @StevdzaSan
      @StevdzaSan  3 роки тому

      I'm glad you like it 💜🙏

  • @MarcelloLins
    @MarcelloLins 2 роки тому

    Excellent video ! Drove the point home with a practical example. Very easy to follow ! Thanks a ton !

  • @wreckeddroid8800
    @wreckeddroid8800 2 роки тому

    wow.. explanation level ..just wow

  • @tessanix9771
    @tessanix9771 Рік тому

    Thank you for these explainations but I think that "remember { State }" keywords does the same things. They allow a composable to remember states/variables during it's lifecycle. Correct me if I'm wrong please.

  • @fazaljarral2792
    @fazaljarral2792 4 роки тому

    Straight forward and easy.

  • @nikisurf
    @nikisurf 4 роки тому

    Nice video man.. I am a developer but, the way you teach people is extraordinary.

  • @UniformDelta00
    @UniformDelta00 4 роки тому +1

    short videos about view model are so few and far between! I got the idea of the purpose of view model thnks

  • @VenewebTV
    @VenewebTV 2 роки тому

    Excellent Video, very useful. Regards from Caracas, Venezuela

  • @keshavjha9835
    @keshavjha9835 4 роки тому

    simple and clear explanation

  • @tmjromao
    @tmjromao 4 роки тому +1

    Excellent tutorial! Easy as it has to be. Very helpful. Many thanks for doing and sharing it

  • @user-pf2bw4uf6l
    @user-pf2bw4uf6l 2 роки тому

    Great video man!! You have save me from various headaches

  • @alexgireff2180
    @alexgireff2180 3 роки тому

    Everything is clear. Nice 👍

  • @tonyblack1981
    @tonyblack1981 3 роки тому

    Perfect, just the explanation I needed. Thank you

  • @iftak01
    @iftak01 3 роки тому +2

    Great example

  • @nirmalrevar
    @nirmalrevar 4 роки тому

    Nicely Explained. After watching your 1 video I subscribed.

  • @MohsenMashkour
    @MohsenMashkour 2 роки тому

    fantastic as always

  • @tommy9x
    @tommy9x 3 роки тому +1

    The onClear explain should be clearer, I not find the Playlist for ViewModel on your Channel, can you create one? And could you give Viewmodel course for Jetpack Compose please?

  • @k.snithin9456
    @k.snithin9456 2 роки тому

    Thank you for explaining using simple and easy to understand examples.

  • @techamatuer8115
    @techamatuer8115 2 місяці тому

    Most amazing and helpful video sir

  • @tayyab222222
    @tayyab222222 Рік тому

    To the point, excellent explanation, thanks..

  • @xaviersoh
    @xaviersoh 2 роки тому

    Very clean and focus

  • @khaxbiker
    @khaxbiker 4 роки тому

    Geat video. Clear and simple. I learnt a lot. Ty

  • @Sippi200
    @Sippi200 4 роки тому

    Thanks! Really good for a beginner like me!

  • @danmccray8201
    @danmccray8201 2 роки тому +1

    Is there any difference when implementing this with Jetpack Compose?

  • @pushpendratripathi46
    @pushpendratripathi46 4 роки тому +2

    Thanks for this great information.

  • @lucye7320
    @lucye7320 4 роки тому

    Awesome video, nice example. Thank you!

  • @DroidDev-dl5xz
    @DroidDev-dl5xz 2 місяці тому

    Great class sir

  • @Danny.Rivver
    @Danny.Rivver 2 роки тому

    Your videos have helped me soo much. thank you soo much for the amazing content!

  • @iqbalrivaldi2856
    @iqbalrivaldi2856 Рік тому

    Good video bro, thia video have a nice explanation about view model and example practice. Good job

  • @thabangmotloung3895
    @thabangmotloung3895 3 роки тому

    nice video, but you forgot to show us when you added the dependency for viewmodel.

  • @bjugdbjk
    @bjugdbjk 3 роки тому

    Great tutorial !!! I want to learn something advance concepts of viewmodel.Do u have anything which I can refer..!!!

  • @mohamedayad70
    @mohamedayad70 3 роки тому

    you made it looks too easy :D
    ty sir

  • @maskmanlifestyle
    @maskmanlifestyle 7 місяців тому

    Thank you for the video ❤

  • @tavoochoa100
    @tavoochoa100 4 роки тому +1

    question, don't we need to implement the library? or the current androidDx thing implements it by default?

  • @RonaldoGuedes
    @RonaldoGuedes 2 роки тому

    Hello!!! First of all, you really know how to explain and let until a dumb get it! thanks

    • @StevdzaSan
      @StevdzaSan  2 роки тому

      Thanks buddy, we're all dumb sometimes 😄

  • @youssoufcameroon2565
    @youssoufcameroon2565 2 роки тому

    Sir, you are a legend

  • @redaantar8908
    @redaantar8908 3 роки тому

    you are the best man i swear

  • @faryzryz1482
    @faryzryz1482 3 роки тому

    WOW!, thanks for the great video , it helps me A LOT! Good Job

  • @piggidivita
    @piggidivita 3 місяці тому

    Beautiful video

  • @АртёмД-э5э
    @АртёмД-э5э 3 роки тому

    amazin explanation!!!! thank you a lot!

  • @brucebane7401
    @brucebane7401 3 роки тому

    amazing !!!! simply amazing thank you so much

  • @bro_chenzox
    @bro_chenzox 4 роки тому

    One more thanks for one more light video.

  • @pradeep9222
    @pradeep9222 3 роки тому +1

    thank you, it's helpful

  • @lilianpuzo225
    @lilianpuzo225 4 роки тому

    Your videos are awesome. Thanks

  • @retajkamal8719
    @retajkamal8719 3 роки тому

    Thank you for the explanation

  • @TheMikkelet
    @TheMikkelet 3 роки тому

    So using a viewmodel in an MVP architecture is a no-go? Because view and presenter indirectly holds a reference to eachother (although usually injected by dagger or hilt)?

  • @Kunal-jp8tn
    @Kunal-jp8tn 2 роки тому

    Thank you so much for this amazing content.....

  • @scalarcoding
    @scalarcoding Рік тому

    so basically when user do some system changes in screen orientation or theme, then the UI will be repaint itself, right? I wonder if it's the same as flutter's statefulwidget

  • @EvanTempleton
    @EvanTempleton 3 роки тому +1

    How are you getting the reference to Button at 1:53? Is this something in your imports?

    • @StevdzaSan
      @StevdzaSan  3 роки тому

      Kotlinx.synthetic is deprecated. Use ViewBinding now, I made a video about it.

    • @EvanTempleton
      @EvanTempleton 3 роки тому

      @@StevdzaSan Thank you! Watching it now.

  • @psxbrasil
    @psxbrasil 2 роки тому

    I have a question. How you can declare "textView.text" without use the "findViewById" method before? How did you get the reference to the TextView element?

  • @surabhidixit8809
    @surabhidixit8809 3 роки тому

    Hi can you explain savedstatehandle in viewmodel with example
    I am not clear about the use
    Thank you

  • @alperencevlik3104
    @alperencevlik3104 3 роки тому

    You're the man!

  • @hachij_
    @hachij_ 4 роки тому

    Thank you! simple

  • @ldxyz-s1e
    @ldxyz-s1e Рік тому

    Is ViewModel life longer than Activitiy or it saves/restores the data by serializing the class and storing it?

  • @cyruscantero9376
    @cyruscantero9376 2 роки тому

    Hello we do this on fragment? are the process same??

  • @aditya-mishra7890
    @aditya-mishra7890 Рік тому

    Loved it

  • @ardhanmaulana7873
    @ardhanmaulana7873 4 роки тому

    woah nice tutorial man. it straight to the point. i just learn android jetpack and i love your content.

  • @lilianpuzo225
    @lilianpuzo225 3 роки тому

    is there any video about share view model? thanks

  • @pawmeowzing2906
    @pawmeowzing2906 2 роки тому

    why not prevent ui recreate when device rotate from androidmanifest?

  • @aathilahamed5871
    @aathilahamed5871 4 роки тому

    Amazing keep going

  • @johndominicjasmin
    @johndominicjasmin 3 роки тому

    Thank you so much

  • @olamao
    @olamao 4 роки тому

    Thanks a lot Stefan. Should I have my string array data for recyclerview in ViewModel? I have issues with my recycler view when rotating the phone. I have the data in sqlite and a function to read the data. However it is not clear to me if each string array should be treated in the way you did in this video. I really appreciate your tutorials.

    • @StevdzaSan
      @StevdzaSan  4 роки тому

      Well if you want your data to be saved when you rotate the screen, you should put the data in viewmodel. However if it is a big hassle, you could just set your app to be in portrait mode. Because not restricting landscape mode, means you need to create landscape layouts for all your screens.

    • @olamao
      @olamao 4 роки тому

      @@StevdzaSan Thanks.I will restrict the app to portrait mode in the short run.

    • @olamao
      @olamao 4 роки тому

      @@StevdzaSan I don't have calculations that I have to save. I update my database each time the user takes an action that requires so. However, the onclicklistener stops working. I play a little sound when the user clicks an action is taken, but when it changes to landscape the sounds is not played any longer. Best regards Mauricio

  • @xBugzilla
    @xBugzilla 3 роки тому

    AllowRotation = false and no more viewmodels
    Actually, if you void rotations, what other common configuration changes made viewmodels useful?

  • @RonaldoGuedes
    @RonaldoGuedes 2 роки тому

    How can I use a button like you, without instance the var with the findViewById... the way you did is pretty good, but I can't do like you.. my Android Studio didn't get the button.

    • @StevdzaSan
      @StevdzaSan  2 роки тому

      View Binding

    • @RonaldoGuedes
      @RonaldoGuedes 2 роки тому

      @@StevdzaSan I didnt see it in your code, are you sure? that activity was empity, no reference to viewBinding

  • @str8busta
    @str8busta 3 роки тому

    so good tutorial

  • @benkabore
    @benkabore 4 роки тому

    The background music is too feint: it's distracting at the current volume because it sounds like background sounds in other room.
    Thanks for the video!

  • @zhe1ka353
    @zhe1ka353 3 роки тому

    when i go to another Activity and then get back - the data is lost, is it as expected? is there any way to keep it persistently?

  • @uu-wl8gw
    @uu-wl8gw 3 роки тому

    Is Viewmodel only implemented for Kotlin? because everywhere I search about mvvm topic, most of the examples are in Kotlin.

  • @randy4443
    @randy4443 4 роки тому

    Can you make a tutorial of viewmodel with fragments?

  • @brandondelacruz934
    @brandondelacruz934 4 роки тому

    When i see Stevdza-San's tutrotials
    Me: *Like... *+1 iq

  • @arupnaskarbkp
    @arupnaskarbkp 4 роки тому +1

    Hello sir ..very nice video..please make advance lavel video to udemy platform

    • @StevdzaSan
      @StevdzaSan  4 роки тому +1

      I will prepare a new course about creating fully functional application using Android Architecture Components.

    • @arupnaskarbkp
      @arupnaskarbkp 4 роки тому

      @@StevdzaSan Udemy Platform ?

  • @idrissamari2733
    @idrissamari2733 2 роки тому

    i'm getting an error in viewmodel provider owner always
    i checked all implementation and still

  • @nguyenquanghuy5709
    @nguyenquanghuy5709 5 місяців тому

    thanks a lot

  • @fyanahmad9418
    @fyanahmad9418 4 роки тому

    thanks man

  • @wilsonneto6035
    @wilsonneto6035 3 роки тому

    good stuff

  • @halilmertdeveli3846
    @halilmertdeveli3846 Рік тому

    I got now thank you

  • @vincejeremyceno4816
    @vincejeremyceno4816 3 роки тому

    is this what they call MVVM?

  • @pa1shetty
    @pa1shetty 3 роки тому

    How did you use button in code without any reference?

  • @jorgeleonardogamarraospino9896
    @jorgeleonardogamarraospino9896 3 роки тому

    How can I do this but with an edittex ?