fctom1215
2021-04-26 67c014b391b3fd36e7d530594c8e94c9655cea8c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package safeluck.drive.evaluation.viewmodels
 
import android.util.Log
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import safeluck.drive.evaluation.bean.ExamPlatformData
 
/**
 * 用来监视是否要结束训练  数值变化
 */
class ExitExamViewModel :ViewModel(){
    private val TAG = "ExitExamViewModel"
    private var exit_exam_count=MutableLiveData<Int>()
    fun getLiveDataExitExam():LiveData<Int>{
        loadValue()
        return exit_exam_count
    }
 
    private fun loadValue() {
        Log.i(TAG,"loadvalue"+ExamPlatformData.getInstance().exitExamFlag)
        exit_exam_count .postValue(ExamPlatformData.getInstance().exitExamFlag)
    }
 
}