Questions regarding applying a Model-View-ViewModel in android application
Questions tagged [android-mvvm]
773 questions
0
votes
1 answer
MVVM with RxJava without DataBinding
After reading a lot of articles about MVVM and RxJava, I need to implement the simplest demo to catch the idea well without using DataBinding
But I got stuck in the way how the ViewModel will notify the View (Activity) with the list of data
My…

Tony George
- 65
- 2
- 10
0
votes
1 answer
textCapSentences does not capitalize the input text
I am developing app for android in Xamarin and MVVMCross. As seen below in the code, the Edittext UI-component is bound to UserInstanceId attribute.
What I am trying to do is, to force the user to enter max. 3 characters and all the character must…

user10776303
- 241
- 6
- 16
0
votes
2 answers
Android databinding does not refresh the changes how can do it?
I have the next code
build.gradle
dataBinding {
enabled = true
}
implementation "android.arch.lifecycle:extensions:$lifecycle_version"
LoginActivity.java
import android.arch.lifecycle.Observer;
import…

Tlaloc-ES
- 4,825
- 7
- 38
- 84
0
votes
2 answers
Radio button in recyclerview with kotlin MVVM and databinding
Redio button in recyclerview with kotlin, dagger2, retrofit , livedata, MVVM and databinding,I need updated list from videModel and also set selected positions to find it
is selected and other on is deselected. please suggest how to select only one…

Uday Nayak
- 429
- 4
- 20
0
votes
0 answers
difference between xmlns:tools and xmlns:bind in MVVM
I am learning how to develop using MVVM. I created a small example as shown below in the code.
my question is about xmlns: in some tutorials they used xmlns:bind while in other xmlns:tools was used.
please let me know th edifference and when to be…

user10776303
- 241
- 6
- 16
0
votes
1 answer
how to change value of UI component via bound variable in the ViewModel
I am learning how to develop using MVVM. I created a small example as shown below in the code.
I want to change the value of the TextView when a UI button is clicked. initially the TextView is set to an empty String.
In the xml file, the TextView UI…

user10776303
- 241
- 6
- 16
0
votes
0 answers
How to have reference of UI component in the ViewModel layer
I am learning how to develop using MVVM. I created a small example as shown below in the code.
My question is, how can I have a reference to the whole UI component such as EditText, Button in the ViewModel class? the reason why I am attempting to do…

user10776303
- 241
- 6
- 16
0
votes
1 answer
Try to getdata from backendless using ViewModel but get IllegalArgumentException: Missing public, default no-argument constructor
I'm trying to get data from a Backendless, I am using kotlin and MVVM arch.
I'm very new to both Kotlin and MVVM. These date would be displayed in a recyclerView in a fragment(which is in a tab).
I get this error:
…

Dr4ke the b4dass
- 1,184
- 2
- 17
- 40
0
votes
0 answers
Error recognizing dataBinding class android
in one of my projects I have started to implement dataBinding in the main activity by separating the data in a class called view, in another class called viewModel and in the model class. Using these classes and the dataBinding, the application has…

juan
- 43
- 8
0
votes
2 answers
Where is the right place to put PagerAdapter, RecyclerViewAdapter in MVVM architecture
When I implement my app using MVVM architecture. I always have a question of where should I put implementations of PagerAdapter and RecyclerViewAdapter. Now I put into Fragments as inner class.

sailing
- 670
- 1
- 5
- 11
0
votes
1 answer
Is it correct to get Activity context from view like button in mvvm
I am new to mvvm pattern and I am working on a feature where I have to do a service call and display a custom ProgressDialog box which requires Activity Context.So I would like to know whether I can pass context from the button which triggers the…

Sam
- 571
- 1
- 6
- 22
0
votes
0 answers
Pull out from first value of List> and set on TextView
I have pass from my MainFragment to my adapter list:
viewModelAppe.getResponseLiveDataCombinedResult().observe(getActivity(),
combinedResult -> mainAdapter.setProjectList(combinedResult.getArtistsWithPhoto()
)) ;
my…

htw
- 1,065
- 7
- 11
0
votes
0 answers
How to pass item ID to ViewModel?
I have little problem with pass Recyclerview item ID from Activity to ViewModel. I need this ID to edit objects.
Does anyone know how to do it in accordance with the MVVM architecture?

user9897182
- 255
- 5
- 18
0
votes
2 answers
Merging and filtering results (RX_observables) from independent source
Hello Everyone and Hello Everything !
I have two independent api (lastFM and iTune) source. Code is working for ich separately, and I can search (filter) for artist that I want. Now I want to combine results, using for this RXJava approach and show…

htw
- 1,065
- 7
- 11
0
votes
1 answer
Android Room - Relationships and LiveData
I have a Lure class which contains an ArrayList of the LureImage class as shown in the code below. Within my repository i make the Database call to get the LiveData
- > and then i execute an AsyncTask to get the List

pavlos
- 547
- 1
- 9
- 23