Complete Android Quotes App | ViewModel Architecture Components Hindi - CheezyCode #5

  Рет қаралды 41,990

Cheezy Code

Cheezy Code

Күн бұрын

Пікірлер: 148
@TheAbhidugar
@TheAbhidugar 3 жыл бұрын
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_hemantpatel8
@036_hemantpatel8 3 жыл бұрын
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.
@pairprogrammer8616
@pairprogrammer8616 2 жыл бұрын
Fan hogya sir apke explanation ka🔥🔥🔥🔥🔥
@tanvi_in_states
@tanvi_in_states Жыл бұрын
Best teacher ever!!! You ace the explanation, I love all the videos, so damn helpful! thank you so much !!
@CheezyCode
@CheezyCode Жыл бұрын
Thanks Tanvi 🤘🏻
@uavishal777
@uavishal777 Жыл бұрын
it's the best series if you want to understand the working of code...Thank you a lot, sir.
@santoshs490
@santoshs490 2 жыл бұрын
Thanks!
@parulson6274
@parulson6274 3 жыл бұрын
I love you sir. Cant express my gratitude in words. You explained cleanest way possible.
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you bro 😊
@sjaffri6939
@sjaffri6939 2 жыл бұрын
GOD BLESS YOU SIR... The way u explain things is very easy.... Thank U so Much
@samardevchauhan2989
@samardevchauhan2989 3 жыл бұрын
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 ❤️😆
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you brother.
@ChiniMini-ChujuMuju
@ChiniMini-ChujuMuju 2 ай бұрын
utha ke basta, naap ke rasta aa jate hai IT mein,,, IT IT IT... awesome lyrics and rap bro
@RaghavSharma-nt3hr
@RaghavSharma-nt3hr 2 жыл бұрын
This series is Amazing! This channel is Amazing! Your teaching is Amazing! **Thank you for all of the content!**
@jatinvashisht4293
@jatinvashisht4293 3 жыл бұрын
What a tutorial sir, hats off to you 👏
@NikhilPawar151
@NikhilPawar151 Жыл бұрын
Thank you sir for such amazing content.
@mahboobforever
@mahboobforever 8 ай бұрын
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,🙂
@khanhsb15
@khanhsb15 2 жыл бұрын
Thank you ! It's helpful for me
@anasyousuf485
@anasyousuf485 2 жыл бұрын
it's a great tutorial where you discuss every thing in detail on it. as always thumbs up 👍
@CheezyCode
@CheezyCode 2 жыл бұрын
Thank you Anas
@omsharmaudaipur
@omsharmaudaipur 2 жыл бұрын
i really like you course
@Ab-no6rz
@Ab-no6rz 3 жыл бұрын
Wow Thank you itne easily samjhane ke liye.
@dhawalbahe2181
@dhawalbahe2181 2 жыл бұрын
Very nice explanation sir....
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks and welcome
@siddharthtakpere5925
@siddharthtakpere5925 2 жыл бұрын
Super explanation 👍👌👌
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks Siddharth
@shankerraoprodduturi
@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
@akshata4092
@akshata4092 2 жыл бұрын
Thank you friend for these view model series ❤
@CheezyCode
@CheezyCode 2 жыл бұрын
Thank you 🤘
@raiadnan9724
@raiadnan9724 3 жыл бұрын
Awesome ❤️ please make full video series on Retrofit with example
@CheezyCode
@CheezyCode 3 жыл бұрын
yes for sure
@raiadnan9724
@raiadnan9724 3 жыл бұрын
@@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.
@hardcodeandroid
@hardcodeandroid 3 жыл бұрын
You are great sir
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you 🤘
@sumeetrathore3140
@sumeetrathore3140 3 жыл бұрын
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.??
@CheezyCode
@CheezyCode 3 жыл бұрын
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.
@maheshgharage8480
@maheshgharage8480 3 жыл бұрын
How can I communicate with you personali for my project
@sopnilshinde985
@sopnilshinde985 9 ай бұрын
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
@CheezyCode
@CheezyCode 9 ай бұрын
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
@harshwavikar99 Жыл бұрын
amazing series, Sir please provide previous and next boundary check code. Getting ArrayIndexOutOfBoundsException: length=1643; index=-1
@CheezyCode
@CheezyCode Жыл бұрын
Check the repo on GitHub...One of our subscribe has fixed it...🤘🏻
@sat_talk
@sat_talk 3 жыл бұрын
Thanks and Awesome as always..pl. keep it up
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you !!
@umangsharma113
@umangsharma113 3 жыл бұрын
What if I wanna have more than one constructor for Mainview model class ?Do I need two factories?
@CheezyCode
@CheezyCode 3 жыл бұрын
This is simply factory pattern implementation. Generally fixed number of parameters are expected. So having secondary constructor in ViewModel does not make sense.
@InnovativeChangazi
@InnovativeChangazi 2 жыл бұрын
Awesome series.
@CheezyCode
@CheezyCode 2 жыл бұрын
Thanks
@Dheerendrakapariya
@Dheerendrakapariya 3 жыл бұрын
Finally, I have found a good tutorial to learn the Kotlin concept. The last song is funny...
@TheAbhidugar
@TheAbhidugar 3 жыл бұрын
Loved the video.
@RahulYadav-vs2wd
@RahulYadav-vs2wd 2 жыл бұрын
Why r you having two theme file, i.e, one for normal and other for night. I think only single theme will do?
@pairprogrammer8616
@pairprogrammer8616 2 жыл бұрын
Awesome
@HrithikRajput-o6b
@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
@shoaibali4309
@shoaibali4309 2 жыл бұрын
Thank you sir.
@CheezyCode
@CheezyCode 2 жыл бұрын
Thank you Shoaib
@asiis181
@asiis181 2 жыл бұрын
can u convert MainViewModel code into live data?
@poojachouhan3991
@poojachouhan3991 3 жыл бұрын
Thank you so much, Sir.
@RanaTahirSohail
@RanaTahirSohail 3 жыл бұрын
good job
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you! Cheers!
@vivekonmyway8826
@vivekonmyway8826 3 жыл бұрын
Thank you 💖
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you Vivek bhai...
@kishorramani007
@kishorramani007 3 жыл бұрын
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?
@CheezyCode
@CheezyCode 3 жыл бұрын
You can use same ViewModel with different activities.
@riyabaranwal6267
@riyabaranwal6267 7 ай бұрын
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
@CheezyCode
@CheezyCode 7 ай бұрын
Give some time... everything will make sense...just follow it..
@riyabaranwal6267
@riyabaranwal6267 7 ай бұрын
Thank you sir
@MrRahulmalik
@MrRahulmalik 3 жыл бұрын
We could have used AndroidViewModel to get application context and no need to make a view model factory
@CheezyCode
@CheezyCode 3 жыл бұрын
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
@ArsalanKazmi007
@ArsalanKazmi007 2 жыл бұрын
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?
@CheezyCode
@CheezyCode 2 жыл бұрын
Yes
@foodiesunita6046
@foodiesunita6046 2 жыл бұрын
Math.random laga do button pe kabhi -1 pe jayega hi nahi 😂😂😂
@yourdailyfails1
@yourdailyfails1 2 жыл бұрын
@@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
@sagarpaliwal6669
@sagarpaliwal6669 3 жыл бұрын
thank you sir
@H1MANSHU
@H1MANSHU 2 жыл бұрын
17:57 , 🏷️🏷️🏷️🏷️
@CheezyCode
@CheezyCode 2 жыл бұрын
🤘
@JyotiGupta-bt2hc
@JyotiGupta-bt2hc 2 жыл бұрын
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
@CheezyCode
@CheezyCode 2 жыл бұрын
What's the use case? Where you need to pass context?
@CheezyCode
@CheezyCode 2 жыл бұрын
Regarding firebase otp...let's see if time allows
@JyotiGupta-bt2hc
@JyotiGupta-bt2hc 2 жыл бұрын
@@CheezyCode In this video you have passed context from
@JyotiGupta-bt2hc
@JyotiGupta-bt2hc 2 жыл бұрын
@@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
@mahboobforever
@mahboobforever 10 ай бұрын
boy? answer Pata chala iska ?
@nitunsingh6986
@nitunsingh6986 3 жыл бұрын
Hello Sir ,I followed all your steps but don't know why my application crashed. Plz help sir
@bhagyabeetrootpatel3722
@bhagyabeetrootpatel3722 3 жыл бұрын
having same issues...can u help please ?
@umangverma3660
@umangverma3660 2 жыл бұрын
@@bhagyabeetrootpatel3722re-code 2 ,3 times, surely works(take reference from git)
@reeceyamato
@reeceyamato 3 жыл бұрын
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 👍
@CheezyCode
@CheezyCode 3 жыл бұрын
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
@preetamgupta3532
@preetamgupta3532 3 жыл бұрын
Thanku Sir
@CheezyCode
@CheezyCode 3 жыл бұрын
Thank you 🤘
@afaaqahmed1697
@afaaqahmed1697 3 жыл бұрын
We need last song of programming man!😃😁
@CheezyCode
@CheezyCode 3 жыл бұрын
50k pe karte hai release 😁
@darkrain5562
@darkrain5562 3 жыл бұрын
Sir G ek Wallpaper app par be hojaye isy tara professional ????
@CheezyCode
@CheezyCode 3 жыл бұрын
bilkul - will try
@darkrain5562
@darkrain5562 3 жыл бұрын
@@CheezyCode TnX sir
@Mohit-il9gx
@Mohit-il9gx 2 жыл бұрын
Yea app playstore pe dal sakhta hu ..?
@CheezyCode
@CheezyCode 2 жыл бұрын
Bilkul bro
@gijane2587
@gijane2587 2 жыл бұрын
Can someone show how we can generate random quotes when loading the app and pressing next everytime
@CheezyCode
@CheezyCode 2 жыл бұрын
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
@gijane2587
@gijane2587 2 жыл бұрын
@@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?
@foodiesunita6046
@foodiesunita6046 2 жыл бұрын
@@gijane2587 no you have to set it on getquotes functions
@spacegyaan2171
@spacegyaan2171 3 жыл бұрын
what if we use kotlin extensions instead of findViewByID
@CheezyCode
@CheezyCode 3 жыл бұрын
You can but they are deprecated
@majsaeed9063
@majsaeed9063 3 жыл бұрын
get() = findViewById() What get function is doing?
@CheezyCode
@CheezyCode 3 жыл бұрын
getter function on field - Kotlin ka getter function hai.
@RahulYadav-vs2wd
@RahulYadav-vs2wd 2 жыл бұрын
I think there is no need to write false if you have already mentioned parent="Theme.MaterialComponents.DayNight.NoActionBar">
@pengvinoidlab8796
@pengvinoidlab8796 3 жыл бұрын
you lit man
@CheezyCode
@CheezyCode 3 жыл бұрын
🔥 😂
@pengvinoidlab8796
@pengvinoidlab8796 3 жыл бұрын
@@CheezyCode are you from Gujarat?
@CheezyCode
@CheezyCode 3 жыл бұрын
Noida
@pengvinoidlab8796
@pengvinoidlab8796 3 жыл бұрын
@@CheezyCode how do you get all the android knowledge so perfect any suggestions? Books or websites except android documentation 🙃
@GD-ix6gd
@GD-ix6gd 3 жыл бұрын
Sir ek real scenario app bnaoo
@muhammaduzair6822
@muhammaduzair6822 3 жыл бұрын
pressing the PREVIOUS button on the first quote crashes the app. could you help me with the workaround for this, please?
@CheezyCode
@CheezyCode 3 жыл бұрын
What's the error?
@CheezyCode
@CheezyCode 3 жыл бұрын
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
@muhammaduzair6822
@muhammaduzair6822 3 жыл бұрын
Yeah, I got it. Thankyou so much for your quick response. :)
@jayantjadhav9566
@jayantjadhav9566 3 жыл бұрын
@@muhammaduzair6822 could yu resolve that issue...Couldnt understand where to apply check..
@jayantjadhav9566
@jayantjadhav9566 3 жыл бұрын
@@CheezyCode where to apply check...I was trying to do it in Mainviewmodel fun previousquote() inline function...But it's giving me error
@mohdflame3944
@mohdflame3944 3 жыл бұрын
me apne project ki coding kaha send kr skta hu
@afaaqahmed1697
@afaaqahmed1697 3 жыл бұрын
afaaqahmed2000@gmail.com mujhy email krdiya krro
@umangverma3660
@umangverma3660 2 жыл бұрын
yhann
@Punarjagran
@Punarjagran 3 жыл бұрын
AAPKA BHI DIN SHUBH HO :)
@namichand6445
@namichand6445 2 жыл бұрын
How to get random quotes every time
@CheezyCode
@CheezyCode 2 жыл бұрын
Math.random
@namichand6445
@namichand6445 2 жыл бұрын
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
@CheezyCode
@CheezyCode 2 жыл бұрын
@@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
@foodiesunita6046
@foodiesunita6046 2 жыл бұрын
Thanks brother random bhi enable ho gaya aur outbound exception bhi thik kr liya
@foodiesunita6046
@foodiesunita6046 2 жыл бұрын
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
@mohdflame3944
@mohdflame3944 3 жыл бұрын
hello sir
@RaghavSharma-nt3hr
@RaghavSharma-nt3hr 2 жыл бұрын
*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)
@krishnacreation9211
@krishnacreation9211 2 жыл бұрын
Why are we getting this error?
@nishi8558
@nishi8558 2 жыл бұрын
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
@CheezyCode
@CheezyCode 2 жыл бұрын
add this in gradle file - kotlinOptions { freeCompilerArgs = ['-Xjvm-default=compatibility'] }
@krishnacreation9211
@krishnacreation9211 2 жыл бұрын
@@CheezyCode why are we getting this problem?
@samirmishra3738
@samirmishra3738 3 жыл бұрын
Thank you sir
@shankerraoprodduturi
@shankerraoprodduturi Ай бұрын
thanks bro
Retrofit in Android Studio using Kotlin | Android Knowledge
19:05
Android Knowledge
Рет қаралды 9 М.
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Convert GUI App to Real Program -  Python to exe to setup wizard
23:27
Python Simplified
Рет қаралды 569 М.
How to Make an Android App for Beginners
19:18
Treehouse
Рет қаралды 6 МЛН
Building a Mobile App in 2025: The BEST Technologies
13:31
Dan Ilies
Рет қаралды 145 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 581 М.
Jetpack Compose Navigation with Nav Arguments | CheezyCode Hindi
20:35