BadCase
配置页面增加现场恢复,默认展示已保存内容
This commit is contained in:
@@ -37,9 +37,9 @@ defStyleAttr: Int = 0
|
||||
}
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
private var mIdentity = "安全员"
|
||||
private var mPreviousDuration = 12
|
||||
private var mBackDuration = 8
|
||||
private var mIdentity = BadCaseConfig.identity
|
||||
private var mPreviousDuration = BadCaseConfig.previousDuration
|
||||
private var mBackDuration = BadCaseConfig.backDuration
|
||||
private var mType = 1
|
||||
|
||||
init{
|
||||
@@ -80,12 +80,12 @@ defStyleAttr: Int = 0
|
||||
|
||||
try {
|
||||
if(preTimeStr.isEmpty()){
|
||||
mPreviousDuration = 12
|
||||
mPreviousDuration = BadCaseConfig.previousDuration
|
||||
}else{
|
||||
mPreviousDuration = preTimeStr.toInt()
|
||||
}
|
||||
if(afterTimeStr.isEmpty()){
|
||||
mBackDuration = 8
|
||||
mBackDuration = BadCaseConfig.backDuration
|
||||
}else{
|
||||
mBackDuration = afterTimeStr.toInt()
|
||||
}
|
||||
@@ -125,6 +125,22 @@ defStyleAttr: Int = 0
|
||||
clickListener?.onClose()
|
||||
}
|
||||
|
||||
//现场恢复
|
||||
when(BadCaseConfig.identity){
|
||||
"安全员"->{
|
||||
rbSafetyOfficer.isChecked = true
|
||||
}
|
||||
"QA、研发"->{
|
||||
rbDeveloper.isChecked = true
|
||||
}
|
||||
"产品、运营、演示"->{
|
||||
rbProduct.isChecked = true
|
||||
}
|
||||
}
|
||||
|
||||
etInitiativePreTime.hint = "${BadCaseConfig.previousDuration}S"
|
||||
etInitiativeAfterTime.hint = "${BadCaseConfig.backDuration}S"
|
||||
|
||||
// val test1 = TestBean(1,"人工接管自动录制")
|
||||
// val test2 = TestBean(2,"地图采集")
|
||||
// val test3 = TestBean(3,"画龙问题排查")
|
||||
@@ -172,7 +188,7 @@ defStyleAttr: Int = 0
|
||||
// )
|
||||
// radioButton.textSize = SizeUtils.sp2px(9f).toFloat()
|
||||
// radioButton.id = it.id
|
||||
// radioButton.isChecked = it.id == 1
|
||||
// radioButton.isChecked = it.id == BadCaseConfig.type
|
||||
// //设置文字
|
||||
// radioButton.text = it.src
|
||||
// //将radioButton添加到radioGroup中
|
||||
@@ -218,7 +234,7 @@ defStyleAttr: Int = 0
|
||||
)
|
||||
radioButton.textSize = SizeUtils.sp2px(9f).toFloat()
|
||||
radioButton.id = it.id
|
||||
radioButton.isChecked = it.id == 1
|
||||
radioButton.isChecked = it.id == BadCaseConfig.type
|
||||
//设置文字
|
||||
radioButton.text = it.desc
|
||||
//将radioButton添加到radioGroup中
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38px"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:drawableLeft="@drawable/badcase_radio_button_style"
|
||||
android:drawablePadding="30px"
|
||||
android:paddingTop="@dimen/dp_30"
|
||||
|
||||
Reference in New Issue
Block a user