lizhanwei
2021-05-18 f2f011cda4910c7c0f40c2d960f313a99dd9b672
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)
    }
 
}