Gobinda PaulHow to use Android ViewModel with Hilt dependencyTo demonstrate that how we can use ViewModel with Hilt, we will use this (SampleProject6) project from this GitHub repository. The project…Oct 3, 2023Oct 3, 2023
Gobinda PaulShared ViewModel concept in AndroidNow that we already know, how to use ViewModel in Activity scope by this post and how to use ViewModel in Fragment scope by this post, it’s…Oct 3, 2023Oct 3, 2023
Gobinda PaulUsing Android ViewModel in Fragment ScopeWe can define Android Viewmodel in such a way that it will be attached to a Fragment, in that case even if the Fragment gets reinitialized…Oct 3, 2023Oct 3, 2023
Gobinda PaulUsing Android ViewModel in Activity scopeTo demonstrate that how we can use ViewModel in Activity scope, we will use this SampleProject3 from this GitHub repository. The project…Sep 18, 2023Sep 18, 2023
Gobinda PaulHandling Activity configuration changes by using SavedInstanceState or Bundle.As we already know now that Android activity doesn’t survive configuration changes by default from this post. So, we have to somehow manage…Sep 18, 2023Sep 18, 2023
Gobinda PaulA sample project to proof that — By default, data related to Android Activity doesn’t survive…To demonstrate that, data related to Android Activity doesn’t survive after configuration changes, we will follow SampleProject1 from this…Sep 18, 2023Sep 18, 2023