Questions tagged [android-mvvm]

Questions regarding applying a Model-View-ViewModel in android application

773 questions
-1
votes
1 answer

Can't get an INSTANCE of a DB using the AndroidViewModel superclass and Room

In my MVVM app, I am extending AndroidViewModel and through a Repository class, I am trying to get an instance of a DB (in a separate abstract class that extends the RoomDatabase superclass). I call the ViewModel from the MainActivity class by the…
user2054516
-1
votes
1 answer

android - room database not created architecture components

I'm using android architecture component and MVVM , i'm using room for offline mode , this is my code for making the connection: @Database(entities = arrayOf(Cat::class), version = 1) abstract class DbConnection : RoomDatabase() { abstract…
-1
votes
1 answer

HTTP 401 - empty recyclerview with RxJava2 and Retrofit2 in MVVM Patterns

I am pretty new to MVVM Patterns and calling API with RxJava2 and Retrofit2. I'm trying to call API from Unsplash API I have no idea what should I do, I've looked over a lot of tutorials but no solution what is happening. Here is where I provide…
-1
votes
2 answers

MVVM LiveData and DataBinding

I'm working on architecture components and now i'm learning LiveData and data binding. I'm able to bind LiveData with layout for Integer values but i'm not able to find for List of Users. This one is a working example for LiveData with data…
Thracian
  • 43,021
  • 16
  • 133
  • 222
-1
votes
2 answers

Setting ImageView width dynamically in a Xamarin Android project

I am trying to dynamically set the ImageView height in Xamarin droid project not in core. LinearLayout layout4 = new LinearLayout(Activity); layout4.LayoutParameters = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WrapContent,…
Devrath
  • 42,072
  • 54
  • 195
  • 297
-2
votes
3 answers

Why is MVVM always presented with Dagger?

I am new in the MVVM architecture, and every documentations I found on internet use Dagger with the MVVM architecture. Dagger is style fuzzy for me and seems to me to be over-complicated to just create an android app. So my questions are…
Moussa
  • 4,066
  • 7
  • 32
  • 49
-3
votes
3 answers

Android Unit Testing with Mockito

I have a ViewModel in which there is a method which has the following line of code: billDate.set(!TextUtils.isEmpty(SampleApp.getInstance().getAccountManager().getDueDate()) ? …
Lavanya
  • 3,903
  • 6
  • 31
  • 57
1 2 3
51
52