lizhanwei
2021-04-27 5069bb2ec816884ef3eb7788f259cbbb8b5f04f4
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)
    }
 
}