viewmodel Questions

2

Solved

I've set up a room database with 3 columns (title, descriptions, genre). I want to query the genre column with a user-specified genre(comedy, horror, etc) and return the results. DAO Interface I...
Karyotin asked 3/4, 2019 at 5:42

3

In my project i have this window to add new Contact object My Question is how i apply this Validation Attributes to WPF window like i do in Asp.net MVC .. like [Required] and some [ReularExpressi...
Mangle asked 23/5, 2012 at 17:46

5

Solved

I am learning ViewModel and LiveData and, in the process, a doubt arose. What should I do if I need to start an Activity? Is it ok to pass the context as a parameter to the ViewModel (the context...
Laurenelaurens asked 21/2, 2019 at 19:12

2

Solved

I have recently upgraded my android studio to version 3.2, and since everywhere I try to access fragment/activity attributes from my ViewModel classes, I get this "Cannot access android.arch.lifecy...
Leavening asked 1/10, 2018 at 13:14

2

Solved

In a word game app I share a model between an activity and a fragment: public class MainViewModel extends AndroidViewModel { private LiveData<List<Game>> mGames; private final Mutabl...

0

I need to use multiple recyclerviews. In the below scenario I will require at least 6 recyclerviews. 6 = 1 for horizontal recyclerview + 3 for each fragment in viewpager + 1 for recylerview + 1 for...
Potvaliant asked 4/12, 2018 at 7:5

2

I have to spend a lot of time learning and implementing Livedata (especially MediatorLivedata) in business logic because it helps to add data from various sources. Had a success with it, because I ...

3

Solved

I am developing an ASP.Net MVC 3 Web application and I am having some difficulties with getting the values from a checkboxlist. I have already read most of the questions on Stackoverflow around thi...
Outrider asked 2/4, 2012 at 9:31

2

Will the onChanged method be called if we dont change the state of the activity or restart the activity? ( Even if the data changes ) . If it doesnt happen how shall i make it happen ? onCreate() ...
Precast asked 19/1, 2018 at 12:51

1

Solved

Currently i'm experimenting with viewmodels and was wondering if passing a viewmodel to a recyclerview adapter will cause a memory leak? The only purpose of the viewmodel in the adapter is to give ...
Stores asked 6/11, 2018 at 21:11

1

Solved

Looking to the code of some Google's demo app (like sunflower or Google io 2018 app) and I've noticed that for the viemodels' backing properties they use a separate instance of the same type with a...
Dustin asked 29/10, 2018 at 16:51

1

I've used PagedList for loading page of items and display them in RecyclerView, and it is successfully displaying list of numbers(0,1,2,3....,99), the list can always be scroll up and down without ...

1

Solved

Now today, LiveData is very popular, How can i send data from activity to fragment using ViewModel and LiveData or vice-versa ? Please explain with coding example.
Calle asked 22/9, 2018 at 16:33

4

Solved

I'm new to developing web apps using ASP.NET MVC. In fact, I'm rather new to developing web apps, regardless of technology. Currently, I'm working on a project just to get to know the ASP.NET MVC ...
Kant asked 2/2, 2011 at 19:31

4

Solved

I have an Activity that contains 3 RecyclerViews. I need populate RecyclerViews with data from remote repository (3 different requests). Can I use multiple ViewModels in the Activity, or is there a...
Beekeeping asked 21/9, 2017 at 9:22

3

Solved

Note: My question is for using DTO, ViewModel in an .NET/C# project. I know DTO, ViewModel, Models. They have specific purposes. We use DTO to transfer data and ViewModel to show data to an end us...
Immitigable asked 28/6, 2017 at 19:27

2

Solved

I have a question that is more related to proper design and architecture of MVVM than to coding itself. In my project I have a situation that on ViewModel is suplying data, that are later used in R...
Homework asked 22/8, 2018 at 20:39

1

I am puzzled by a (I thought) simple thing to implement; make a UI element visible depending on a binding to a view model. I use the mvvmlight framework. When the binding (boolean) is set to true t...
Limey asked 17/8, 2018 at 20:41

4

Solved

I have been beating my head against the wall and I cannot understand why this is happening. I am working with the new Architectural Components for Android and I am having problems updating a LiveDa...
Catacomb asked 25/8, 2017 at 21:26

2

Solved

I'm using MVC 4, .Net 4, and Visual Studio 2012. I'm trying to use a fairly complex model with one of my views, and I'm having serious trouble getting it to bind properly. The model wraps a Dicti...
Calaboose asked 4/6, 2013 at 23:32

1

I have an app that runs a service, which should continue working even when the app is closed. I need to share info between them, and I want to try doing this using a ViewModel. I know how to share ...
Dimer asked 6/12, 2017 at 21:38

4

Solved

I am working on a large ASP.NET MVC Project(about 15 separate projects). We are using a Facade Design Pattern to call Business logic as well as other Projects. Question: in MVC application is it ...
Dodson asked 10/4, 2014 at 5:40

1

I am looking at the https://developer.android.com/topic/libraries/architecture/saving-states. It mention of "system-initiated process death". What does it actually mean?
Agronomy asked 10/7, 2018 at 22:59

1

I wrote an Android app using MVVM where I am calling webservice from ViewModel and storing results in RoomDB. In the View I am observing ViewModel for live data. I need to show ProgressDialog while...
Paba asked 10/7, 2018 at 10:23

1

Solved

I'm studying Android + Kotlin and make a simple example to understand LiveData + ViewModel. It's very simple: I have one root activity and two fragments. FragmentOne has two EditTexts. That values ...
Visitation asked 12/6, 2018 at 19:17

© 2022 - 2024 — McMap. All rights reserved.