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 com.cesams.twogetskills.entity.Capsule;
7
 
8
import java.util.ArrayList;
9
 
10
public class CapsuleViewModel extends ViewModel {
11
    private MutableLiveData<ArrayList<Capsule>> capsuleLiveData;
12
    private ArrayList<Capsule> capsuleArrayList;
13
 
14
    public CapsuleViewModel() {
15
 
16
         capsuleArrayList = new ArrayList<>();
17
 
18
        capsuleLiveData = new MutableLiveData<>();
19
        capsuleLiveData.setValue(capsuleArrayList);
20
    }
21
 
22
    public MutableLiveData<ArrayList<Capsule>> getCapsuleMutableLiveData() {
23
        return capsuleLiveData;
24
    }
25
 
26
    public ArrayList<Capsule> getCapsuleArrayList() {
27
        return capsuleArrayList;
28
    }
29
}