Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
2 votes
0 answers
106 views

Is there any rule to follow to create mvvm project structure in android studio project

Generally, MVVM or MVC or MVP , we are allocating classes under the package structure, as per architecture pattern role and responsible of each components. Ex: View - Design/user interaction related ...
harikrishnan's user avatar
  • 2,015
2 votes
1 answer
3k views

Firebase authentication with MVVM kotlin

I m new in MVVM and jetpack library. i have an simple application of firebase Authentication , Registration and login. i try many code but i am not getting flow for view Model and repertory. so any ...
Khushbu's user avatar
  • 78
1 vote
2 answers
806 views

Detect Adapter onclick Listener method in activity using Entrypoints Dagger hilt

I need a help to detect adapter onclick event in activity class with the help of dagger hilt. Step1 : I have created one interface class which name is ItemClickListener and use EntryPoint using Dagger ...
Nimesh Patel's user avatar
  • 1,488
1 vote
2 answers
1k views

Cannot create an instance of an abstract class in MainActivity

I'm new to kotlin. I dont know how to fix this error. I'm getting "Cannot create an instance of abstract class" compile error I'm getting in MainActivity at below line: val newsRepository = ...
Naruto's user avatar
  • 21
1 vote
1 answer
859 views

Is there any way to use MVVM software architectural pattern in a KMM project without using moko mvvm?

I'm new to KMM (Kotlin Multiplatform Mobile). I need to use MVVM in this project and I just need to use jetpack for ViewModels. So, how can I organize MVVM architecture in the KMM project?
Ishara Rathnayake's user avatar
0 votes
1 answer
269 views

Fragment Back Navigation Blocked by ViewModel

So I'm trying to implement mvvm architecture with navigation component, this code snipet works just fine.. the problem is that when I navigate from fragmentA to FragmentB there is no way to go back to ...
Mr. Thanks a lot's user avatar
1 vote
1 answer
293 views

MVVM Single Activity app return to a nested fragment with Navigation component after leaving app or launching intent

I am trying to return to a specific fragment after pressing the home button, sharing data with another app or switching activities. Fragments in bottomNav: A B C D Fragments that are shared around the ...
MaxGDN's user avatar
  • 1,591
0 votes
0 answers
188 views

How to compare PagingData to Local Database in MVVM [Android]

Hey there i have a bottom navigation view and multiple fragments to be exact 3 of them what they do-> Home -> Shows random images from a paginated api with a heart icon based on if its saved ...
Aditya Bhawsar's user avatar
1 vote
1 answer
688 views

How to update custom view data to data binding?

I'm trying to update custom view data to data binding (Jetpack). The custom view has attributes so I was making ViewBindingAdapter. But, That's update only one time on Activity onCreate or init ...
Holy-Knight's user avatar
4 votes
2 answers
3k views

How to dynamically modify variables in PagingSource class, Paging Library 3.0

I have a livedata called selectedModuleTab which holds some variables like filters I need to pass those filters to the data source repository crmRepo in order to fetch data from server. I just started ...
George's user avatar
  • 43
1 vote
1 answer
2k views

Data Binding and: Input field validation and manipulation; Activity/Fragment Navigation

I am currently learning data binding and all the new things that come with it. At the moment I am struggling quite a bit with how to properly implement things, so asking for some help. In this ...
vt-dev0's user avatar
  • 763
0 votes
1 answer
346 views

Android Kotlin MVVM with dagger, JetPack components

Currently i am working in Kotlin android development. while writing the MVVM architecture, i am stuck with ViewModel Creation Error : Only classes are allowed on the left hand side of a class literal ...
shamjins's user avatar
0 votes
0 answers
216 views

Handling configuration changes with MVVM android

Hello I'm using MVVM architecture (ViewModel, LiveData) to develop my android app and I have one activity and 2 fragments in it , when I'm in second fragment and rotate the screen the second fragment ...
vinay kumar's user avatar
1 vote
2 answers
3k views

How to Inject Work Manager in ViewModel using Hilt

I am trying to use Work manager in viewModel for uploading files on server, so how can i inject WorkManager? I tried this https://developer.android.com/training/dependency-injection/hilt-jetpack but ...
iamkdblue's user avatar
  • 3,574
0 votes
1 answer
85 views

android.os.NetworkOnMainThreadException exception while trying to call a webservice from my android Services?

I have a scenario where I need to call the Webservices from the Android Services. Currently I am starting the Services from the Activity by Intent mServiceIntent = new Intent(this, AServices.class); ...
Android Man's user avatar

15 30 50 per page