5:00 🤣🤣 hamesha mera yahi sawaal hota hai mann me ki ye pata kesi lagti hai sab cheezien. kehte kya hai inko ki search karien. Awesome Video.
@036_hemantpatel83 жыл бұрын
4:57 It's a Golden Lines 😇😇 do not worry about all things just google what you want but you should have the basic idea. btw Great tutorial Sir thank you so much.
@pairprogrammer86162 жыл бұрын
Fan hogya sir apke explanation ka🔥🔥🔥🔥🔥
@tanvi_in_states Жыл бұрын
Best teacher ever!!! You ace the explanation, I love all the videos, so damn helpful! thank you so much !!
@CheezyCode Жыл бұрын
Thanks Tanvi 🤘🏻
@uavishal777 Жыл бұрын
it's the best series if you want to understand the working of code...Thank you a lot, sir.
@santoshs4902 жыл бұрын
Thanks!
@parulson62743 жыл бұрын
I love you sir. Cant express my gratitude in words. You explained cleanest way possible.
@CheezyCode3 жыл бұрын
Thank you bro 😊
@sjaffri69392 жыл бұрын
GOD BLESS YOU SIR... The way u explain things is very easy.... Thank U so Much
@samardevchauhan29893 жыл бұрын
Thank You So Much . Last time also you helped me in making my blog app and I made it successfully. This time I will make my quote app. Why u always make videos as per my need . Thanks Bro ❤️😆
@CheezyCode3 жыл бұрын
Thank you brother.
@ChiniMini-ChujuMuju2 ай бұрын
utha ke basta, naap ke rasta aa jate hai IT mein,,, IT IT IT... awesome lyrics and rap bro
@RaghavSharma-nt3hr2 жыл бұрын
This series is Amazing! This channel is Amazing! Your teaching is Amazing! **Thank you for all of the content!**
@jatinvashisht42933 жыл бұрын
What a tutorial sir, hats off to you 👏
@NikhilPawar151 Жыл бұрын
Thank you sir for such amazing content.
@mahboobforever8 ай бұрын
sir, Qasam hai us khuda ki , jisny muje or apko paida kiya ,,,,,, me apki videos ko last 3 months sy follow kr rha hu or ab revision chal rahi meri,,, to ab concepts kuch clear hain to pata chalta ha ky sab kuch ap difine krty hain means sab kuch ........... Is ka output apko Allah/ bhagwan/ khuda , zrorr dyga ameeen,🙂
@khanhsb152 жыл бұрын
Thank you ! It's helpful for me
@anasyousuf4852 жыл бұрын
it's a great tutorial where you discuss every thing in detail on it. as always thumbs up 👍
@CheezyCode2 жыл бұрын
Thank you Anas
@omsharmaudaipur2 жыл бұрын
i really like you course
@Ab-no6rz3 жыл бұрын
Wow Thank you itne easily samjhane ke liye.
@dhawalbahe21812 жыл бұрын
Very nice explanation sir....
@CheezyCode2 жыл бұрын
Thanks and welcome
@siddharthtakpere59252 жыл бұрын
Super explanation 👍👌👌
@CheezyCode2 жыл бұрын
Thanks Siddharth
@shankerraoprodduturiАй бұрын
Irequest you put same concepts in java language too in place of kotlin. it will be great help to so many java platform developers with android apps
@akshata40922 жыл бұрын
Thank you friend for these view model series ❤
@CheezyCode2 жыл бұрын
Thank you 🤘
@raiadnan97243 жыл бұрын
Awesome ❤️ please make full video series on Retrofit with example
@CheezyCode3 жыл бұрын
yes for sure
@raiadnan97243 жыл бұрын
@@CheezyCode bro would you please tell us how we can play our quotes? I mean to say how we implement player in quotes app so user can ready, listen and copy Qoutes at the same time.
@hardcodeandroid3 жыл бұрын
You are great sir
@CheezyCode3 жыл бұрын
Thank you 🤘
@sumeetrathore31403 жыл бұрын
Hi sir its very helpful and understandable video ....i have question what is the use of init method in viewmodel class , is it necessary to use that method for initialization.??
@CheezyCode3 жыл бұрын
If you are asking about init block in view model then it is just a Kotlin concept. While creating the object, init block is called - use of it depends on your requirements. During the initialisation of the object if you want to execute some code - you can use init block inside any class.
@maheshgharage84803 жыл бұрын
How can I communicate with you personali for my project
@sopnilshinde9859 ай бұрын
Is it a good idea to pass a Context to ViewModel , since we try to keep things loosely coupled , like view and viewModel should be loosely coupled , if you pass context of view to View model , I am bit curious about this
@CheezyCode9 ай бұрын
Depends on how you use it. Context is needed in this case. We should pass Application Context. Passing context as an input is always preferable to have testable class. You can easily write the test cases.
@harshwavikar99 Жыл бұрын
amazing series, Sir please provide previous and next boundary check code. Getting ArrayIndexOutOfBoundsException: length=1643; index=-1
@CheezyCode Жыл бұрын
Check the repo on GitHub...One of our subscribe has fixed it...🤘🏻
@sat_talk3 жыл бұрын
Thanks and Awesome as always..pl. keep it up
@CheezyCode3 жыл бұрын
Thank you !!
@umangsharma1133 жыл бұрын
What if I wanna have more than one constructor for Mainview model class ?Do I need two factories?
@CheezyCode3 жыл бұрын
This is simply factory pattern implementation. Generally fixed number of parameters are expected. So having secondary constructor in ViewModel does not make sense.
@InnovativeChangazi2 жыл бұрын
Awesome series.
@CheezyCode2 жыл бұрын
Thanks
@Dheerendrakapariya3 жыл бұрын
Finally, I have found a good tutorial to learn the Kotlin concept. The last song is funny...
@TheAbhidugar3 жыл бұрын
Loved the video.
@RahulYadav-vs2wd2 жыл бұрын
Why r you having two theme file, i.e, one for normal and other for night. I think only single theme will do?
@pairprogrammer86162 жыл бұрын
Awesome
@HrithikRajput-o6b Жыл бұрын
Hello sir, I was trying to fetch data using volleye and trying to store in arraylist. I created a function and it returns a arraylist with all the data in api. When I initilize the quotelist arraylist it show length=0 index =0. Please help
@shoaibali43092 жыл бұрын
Thank you sir.
@CheezyCode2 жыл бұрын
Thank you Shoaib
@asiis1812 жыл бұрын
can u convert MainViewModel code into live data?
@poojachouhan39913 жыл бұрын
Thank you so much, Sir.
@RanaTahirSohail3 жыл бұрын
good job
@CheezyCode3 жыл бұрын
Thank you! Cheers!
@vivekonmyway88263 жыл бұрын
Thank you 💖
@CheezyCode3 жыл бұрын
Thank you Vivek bhai...
@kishorramani0073 жыл бұрын
Hi sir, Thank you 🙌 Want to know can we use MainViewModel with different activities Here, I created a QuoteListActivity and I want to show list of quote in recyclerview and onItemClick of item open QuoteActivity which show single quote My question is If I user same MainViewModel with different activities is right choice or is there another way to achive this scenario?
@CheezyCode3 жыл бұрын
You can use same ViewModel with different activities.
@riyabaranwal62677 ай бұрын
can anybody help , actually I am a beginner and going to 3rd year . I started this android development journey with one udemy course of 'Denis Panjuta' but when I was learning MVVM I was having issue as he didn't make us understand in deep therefore I am here but when watching this video I was lost since , for eg- in this video sir went in the res or the layout folder to change the color or define the icons but according to Denis sir ,I use to do it in the main activity only , even I was defining every single detail of button , icons , and many more in a different way . This question might seem silly but please if possible help me , I am unable to understand , wht's happening , I am feeling like giving up
@CheezyCode7 ай бұрын
Give some time... everything will make sense...just follow it..
@riyabaranwal62677 ай бұрын
Thank you sir
@MrRahulmalik3 жыл бұрын
We could have used AndroidViewModel to get application context and no need to make a view model factory
@CheezyCode3 жыл бұрын
Yes. But AndroidViewModels are not easy to unit test. It's better to use ViewModel instead. There is always a debate on when to use what but most of the developers have suggested to go for ViewModels
@ArsalanKazmi0072 жыл бұрын
If we are on index 0 and then we press previous. The index shall decrement to -1 and we can get a NullPointerException? We need to handle that too here ,Right?
@CheezyCode2 жыл бұрын
Yes
@foodiesunita60462 жыл бұрын
Math.random laga do button pe kabhi -1 pe jayega hi nahi 😂😂😂
@yourdailyfails12 жыл бұрын
@@foodiesunita6046 or better loop kar do if -1 send him to list.size-1 and if reaches list.size-1 send him to index 0
@sagarpaliwal66693 жыл бұрын
thank you sir
@H1MANSHU2 жыл бұрын
17:57 , 🏷️🏷️🏷️🏷️
@CheezyCode2 жыл бұрын
🤘
@JyotiGupta-bt2hc2 жыл бұрын
Hello SIr, if we donot want to pass context in viewmodel as it gives memory leak warning, whats the alternative we can used for it. Please reply. Also if you can please make videos on firebase otp phone aurhentication with mvvm data binding. It will help me alot in understanding this pattern
@CheezyCode2 жыл бұрын
What's the use case? Where you need to pass context?
@CheezyCode2 жыл бұрын
Regarding firebase otp...let's see if time allows
@JyotiGupta-bt2hc2 жыл бұрын
@@CheezyCode In this video you have passed context from
@JyotiGupta-bt2hc2 жыл бұрын
@@CheezyCode You have passed context from MainActitvity to ViewModalFactory to get it in ViewModal class, And by doing so it will give warning error of memory leak .SO thats why am asking for the alternative if there is any
@mahboobforever10 ай бұрын
boy? answer Pata chala iska ?
@nitunsingh69863 жыл бұрын
Hello Sir ,I followed all your steps but don't know why my application crashed. Plz help sir
@bhagyabeetrootpatel37223 жыл бұрын
having same issues...can u help please ?
@umangverma36602 жыл бұрын
@@bhagyabeetrootpatel3722re-code 2 ,3 times, surely works(take reference from git)
@reeceyamato3 жыл бұрын
I like this, can you show how to do it in java Android? I have an motivational app almost 80% finish in Java and I will love to add this feature in my project, but I can start from cero in kotlin, if you can I will really appreciate, thank you and Good work 👍
@CheezyCode3 жыл бұрын
Bro no more Java in Android World...agar Java aati hai go for Kotlin - it will not take more than a week to learn all the required concepts. We have a playlist on Kotlin - binge watch karlo...clear hojayega
@preetamgupta35323 жыл бұрын
Thanku Sir
@CheezyCode3 жыл бұрын
Thank you 🤘
@afaaqahmed16973 жыл бұрын
We need last song of programming man!😃😁
@CheezyCode3 жыл бұрын
50k pe karte hai release 😁
@darkrain55623 жыл бұрын
Sir G ek Wallpaper app par be hojaye isy tara professional ????
@CheezyCode3 жыл бұрын
bilkul - will try
@darkrain55623 жыл бұрын
@@CheezyCode TnX sir
@Mohit-il9gx2 жыл бұрын
Yea app playstore pe dal sakhta hu ..?
@CheezyCode2 жыл бұрын
Bilkul bro
@gijane25872 жыл бұрын
Can someone show how we can generate random quotes when loading the app and pressing next everytime
@CheezyCode2 жыл бұрын
1. Get a random index using Math.random within 0 & size of the list 2. use this index inside the observer and set the textview
@gijane25872 жыл бұрын
@@CheezyCode so sir, in main view model i should get a random index and then in main activity i can give the text view. Right?
@foodiesunita60462 жыл бұрын
@@gijane2587 no you have to set it on getquotes functions
@spacegyaan21713 жыл бұрын
what if we use kotlin extensions instead of findViewByID
@CheezyCode3 жыл бұрын
You can but they are deprecated
@majsaeed90633 жыл бұрын
get() = findViewById() What get function is doing?
@CheezyCode3 жыл бұрын
getter function on field - Kotlin ka getter function hai.
@RahulYadav-vs2wd2 жыл бұрын
I think there is no need to write false if you have already mentioned parent="Theme.MaterialComponents.DayNight.NoActionBar">
@pengvinoidlab87963 жыл бұрын
you lit man
@CheezyCode3 жыл бұрын
🔥 😂
@pengvinoidlab87963 жыл бұрын
@@CheezyCode are you from Gujarat?
@CheezyCode3 жыл бұрын
Noida
@pengvinoidlab87963 жыл бұрын
@@CheezyCode how do you get all the android knowledge so perfect any suggestions? Books or websites except android documentation 🙃
@GD-ix6gd3 жыл бұрын
Sir ek real scenario app bnaoo
@muhammaduzair68223 жыл бұрын
pressing the PREVIOUS button on the first quote crashes the app. could you help me with the workaround for this, please?
@CheezyCode3 жыл бұрын
What's the error?
@CheezyCode3 жыл бұрын
I guess 0th position pe decrement karne pe error aa rahi hogi...simple boundary check laga skte ho while fetching the data...aur you can disable the buttons if index is 0 or index is equal to size - 1
@muhammaduzair68223 жыл бұрын
Yeah, I got it. Thankyou so much for your quick response. :)
@jayantjadhav95663 жыл бұрын
@@muhammaduzair6822 could yu resolve that issue...Couldnt understand where to apply check..
@jayantjadhav95663 жыл бұрын
@@CheezyCode where to apply check...I was trying to do it in Mainviewmodel fun previousquote() inline function...But it's giving me error
@mohdflame39443 жыл бұрын
me apne project ki coding kaha send kr skta hu
@afaaqahmed16973 жыл бұрын
afaaqahmed2000@gmail.com mujhy email krdiya krro
@umangverma36602 жыл бұрын
yhann
@Punarjagran3 жыл бұрын
AAPKA BHI DIN SHUBH HO :)
@namichand64452 жыл бұрын
How to get random quotes every time
@CheezyCode2 жыл бұрын
Math.random
@namichand64452 жыл бұрын
I cant under stand where the data is getting from json so that after that i can randomise the data after getting it Also after last index of list app crashes cant handle the incremental 😂😂 i know its silly but i m helpless
@CheezyCode2 жыл бұрын
@@namichand6445 nextQuote wale function ke andar logic likhdo...randomization ka I know boundary checks defined nahi h - wo mention bhi kiya hai video mei - you can refer the source code for this on github.com/cheezycode
@foodiesunita60462 жыл бұрын
Thanks brother random bhi enable ho gaya aur outbound exception bhi thik kr liya
@foodiesunita60462 жыл бұрын
Ab bas ek baar ye aur Bata do ki catagory kaise add karein like agar motivation category select kre to next activity me motivation.json se qoutes pick kare aur agar love category select kre to love.json se pick kre
@mohdflame39443 жыл бұрын
hello sir
@RaghavSharma-nt3hr2 жыл бұрын
*Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-default option* If anyone getting this error in the ViewmodelFactory class, then, add -> kotlinOptions { jvmTarget = '1.8' freeCompilerArgs = ['-Xjvm-default=compatibility'] } to your build.gradle(:app)
@krishnacreation92112 жыл бұрын
Why are we getting this error?
@nishi85582 жыл бұрын
Hello Sir, i'm facing a problem while creating ViewModelFactory, please help me out Here is my code: class MainViewModelFactory(private val context: Context) : ViewModelProvider.Factory { override fun create(modelClass: Class): T { return MainViewModel(context) as T } } Problem: Inheritance from an interface with '@JvmDefault' members is only allowed with -Xjvm-default option
@CheezyCode2 жыл бұрын
add this in gradle file - kotlinOptions { freeCompilerArgs = ['-Xjvm-default=compatibility'] }