AutorÃa | Ultima modificación | Ver Log |
package com.cesams.twogetskills.viewmodel;import androidx.lifecycle.MutableLiveData;import androidx.lifecycle.ViewModel;import java.util.ArrayList;import java.util.List;import com.cesams.twogetskills.entity.Topic;public class TopicViewModel extends ViewModel {private MutableLiveData<ArrayList<Topic>> topicLiveData;private ArrayList<Topic> topicArrayList;public TopicViewModel() {topicArrayList = new ArrayList<>();topicLiveData = new MutableLiveData<>();topicLiveData.setValue(topicArrayList);}public MutableLiveData<ArrayList<Topic>> getTopicMutableLiveData() {return topicLiveData;}public ArrayList<Topic> getTopicArrayList() {return topicArrayList;}}