List of questions
Related questions
Question 72 - Associate Android Developer discussion
In our TeaViewModel class, that extends ViewModel, we have such method:
public LiveData<Tea> getTea() { return mTea; }
An observer in our Activity (type of mViewModel variable in example is TeaViewModel) is set in this way:
mViewModel.getTea().observe(this, this::displayTea);
What will be a correct displayTea method definition?
A.
private void displayTea()
B.
private void displayTea(Tea tea)
C.
private void displayTea(LiveData<Tea>)
D.
private void displayTea(LiveData<T>)
Your answer:
0 comments
Sorted by
Leave a comment first