Proyectos de Subversion Android Microlearning

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
package com.cesams.twogetskills.viewmodel;
2
 
3
import androidx.lifecycle.MutableLiveData;
4
import androidx.lifecycle.ViewModel;
5
 
6
import java.util.ArrayList;
7
import java.util.List;
8
 
9
import com.cesams.twogetskills.entity.Topic;
10
 
11
public class TopicViewModel extends ViewModel {
12
    private MutableLiveData<ArrayList<Topic>> topicLiveData;
13
    private ArrayList<Topic> topicArrayList;
14
 
15
    public TopicViewModel() {
16
 
17
        topicArrayList = new ArrayList<>();
18
 
19
        topicLiveData = new MutableLiveData<>();
20
        topicLiveData.setValue(topicArrayList);
21
    }
22
 
23
    public MutableLiveData<ArrayList<Topic>> getTopicMutableLiveData() {
24
        return topicLiveData;
25
    }
26
 
27
    public ArrayList<Topic> getTopicArrayList() {
28
        return topicArrayList;
29
    }
30
 
31
 
32
 
33
}