|
@@ -330,9 +330,9 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
private fun changeWeightStep() {
|
|
private fun changeWeightStep() {
|
|
whereIndex = -1
|
|
whereIndex = -1
|
|
binding.clSetTime.stopAlphaAnim()
|
|
binding.clSetTime.stopAlphaAnim()
|
|
- binding.ivWeight.visibility = View.GONE
|
|
|
|
- binding.ivTurbo.visibility = View.GONE
|
|
|
|
- binding.functionLayout.visibility = View.GONE
|
|
|
|
|
|
+ binding.ivWeight.visibility = View.INVISIBLE
|
|
|
|
+ binding.ivTurbo.visibility = View.INVISIBLE
|
|
|
|
+ binding.functionLayout.visibility = View.INVISIBLE
|
|
binding.llWeightView.visibility = View.VISIBLE
|
|
binding.llWeightView.visibility = View.VISIBLE
|
|
//开始称重
|
|
//开始称重
|
|
CofarSDK.startWeight()
|
|
CofarSDK.startWeight()
|
|
@@ -342,10 +342,10 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
whereIndex = -1
|
|
whereIndex = -1
|
|
binding.clSetTime.stopAlphaAnim()
|
|
binding.clSetTime.stopAlphaAnim()
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
- binding.llWeightView.visibility = View.GONE
|
|
|
|
|
|
+ binding.llWeightView.visibility = View.INVISIBLE
|
|
if (modeType == ModesType.WIGHT.name || modeType == ModesType.TURBO.name) {
|
|
if (modeType == ModesType.WIGHT.name || modeType == ModesType.TURBO.name) {
|
|
- binding.ivWeight.visibility = View.GONE
|
|
|
|
- binding.ivTurbo.visibility = View.GONE
|
|
|
|
|
|
+ binding.ivWeight.visibility = View.INVISIBLE
|
|
|
|
+ binding.ivTurbo.visibility = View.INVISIBLE
|
|
if (modeType == ModesType.TURBO.name) {
|
|
if (modeType == ModesType.TURBO.name) {
|
|
binding.ivTurboView.visibility = View.VISIBLE
|
|
binding.ivTurboView.visibility = View.VISIBLE
|
|
}
|
|
}
|
|
@@ -358,20 +358,20 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
|
|
|
|
|
|
|
|
private fun changeTempSettingStep() {
|
|
private fun changeTempSettingStep() {
|
|
- binding.llWeightView.visibility = View.GONE
|
|
|
|
|
|
+ binding.llWeightView.visibility = View.INVISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
- binding.speedRingView.visibility = View.GONE
|
|
|
|
- binding.speedRingText.visibility = View.GONE
|
|
|
|
- binding.tempRingTextCooking.visibility = View.GONE
|
|
|
|
- binding.clSetTime.visibility = View.GONE
|
|
|
|
- binding.flDirection.visibility = View.GONE
|
|
|
|
|
|
+ binding.speedRingView.visibility = View.INVISIBLE
|
|
|
|
+ binding.speedRingText.visibility = View.INVISIBLE
|
|
|
|
+ binding.tempRingTextCooking.visibility = View.INVISIBLE
|
|
|
|
+ binding.clSetTime.visibility = View.INVISIBLE
|
|
|
|
+ binding.flDirection.visibility = View.INVISIBLE
|
|
binding.tempRingView.visibility = View.VISIBLE
|
|
binding.tempRingView.visibility = View.VISIBLE
|
|
binding.tempRingText.visibility = View.VISIBLE
|
|
binding.tempRingText.visibility = View.VISIBLE
|
|
|
|
|
|
|
|
|
|
//处理蒸汽模式
|
|
//处理蒸汽模式
|
|
if (modeType == ModesType.STEAM.name) {
|
|
if (modeType == ModesType.STEAM.name) {
|
|
- binding.tempRingText.visibility = View.GONE;
|
|
|
|
|
|
+ binding.tempRingText.visibility = View.INVISIBLE;
|
|
binding.clCookTemp.turnSteamMode();
|
|
binding.clCookTemp.turnSteamMode();
|
|
binding.steamFire.visibility = View.VISIBLE
|
|
binding.steamFire.visibility = View.VISIBLE
|
|
} else {
|
|
} else {
|
|
@@ -382,47 +382,47 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
}
|
|
}
|
|
|
|
|
|
private fun changeTimeSettingStep() {
|
|
private fun changeTimeSettingStep() {
|
|
- binding.steamFire.visibility = View.GONE
|
|
|
|
- binding.llWeightView.visibility = View.GONE
|
|
|
|
|
|
+ binding.steamFire.visibility = View.INVISIBLE
|
|
|
|
+ binding.llWeightView.visibility = View.INVISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
- binding.speedRingView.visibility = View.GONE
|
|
|
|
- binding.speedRingText.visibility = View.GONE
|
|
|
|
- binding.tempRingText.visibility = View.GONE
|
|
|
|
- binding.tempRingTextCooking.visibility = View.GONE
|
|
|
|
|
|
+ binding.speedRingView.visibility = View.INVISIBLE
|
|
|
|
+ binding.speedRingText.visibility = View.INVISIBLE
|
|
|
|
+ binding.tempRingText.visibility = View.INVISIBLE
|
|
|
|
+ binding.tempRingTextCooking.visibility = View.INVISIBLE
|
|
binding.clSetTime.visibility = View.VISIBLE
|
|
binding.clSetTime.visibility = View.VISIBLE
|
|
- binding.flDirection.visibility = View.GONE
|
|
|
|
|
|
+ binding.flDirection.visibility = View.INVISIBLE
|
|
setPanelViewProperty(CookSettingType.TIME_SETTING)
|
|
setPanelViewProperty(CookSettingType.TIME_SETTING)
|
|
}
|
|
}
|
|
|
|
|
|
private fun changeSpeedSettingStep() {
|
|
private fun changeSpeedSettingStep() {
|
|
whereIndex = -1
|
|
whereIndex = -1
|
|
binding.clSetTime.stopAlphaAnim()
|
|
binding.clSetTime.stopAlphaAnim()
|
|
- binding.steamFire.visibility = View.GONE
|
|
|
|
- binding.llWeightView.visibility = View.GONE
|
|
|
|
|
|
+ binding.steamFire.visibility = View.INVISIBLE
|
|
|
|
+ binding.llWeightView.visibility = View.INVISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
binding.tempRingText.visibility = View.INVISIBLE
|
|
binding.tempRingText.visibility = View.INVISIBLE
|
|
binding.speedRingView.visibility = View.VISIBLE
|
|
binding.speedRingView.visibility = View.VISIBLE
|
|
binding.speedRingText.visibility = View.VISIBLE
|
|
binding.speedRingText.visibility = View.VISIBLE
|
|
- binding.tempRingTextCooking.visibility = View.GONE
|
|
|
|
- binding.clSetTime.visibility = View.GONE
|
|
|
|
- binding.flDirection.visibility = View.GONE
|
|
|
|
|
|
+ binding.tempRingTextCooking.visibility = View.INVISIBLE
|
|
|
|
+ binding.clSetTime.visibility = View.INVISIBLE
|
|
|
|
+ binding.flDirection.visibility = View.INVISIBLE
|
|
setPanelViewProperty(CookSettingType.SPEED_SETTING)
|
|
setPanelViewProperty(CookSettingType.SPEED_SETTING)
|
|
}
|
|
}
|
|
|
|
|
|
private fun changeDirectionSettingStep() {
|
|
private fun changeDirectionSettingStep() {
|
|
- binding.steamFire.visibility = View.GONE
|
|
|
|
|
|
+ binding.steamFire.visibility = View.INVISIBLE
|
|
whereIndex = -1
|
|
whereIndex = -1
|
|
binding.clSetTime.stopAlphaAnim()
|
|
binding.clSetTime.stopAlphaAnim()
|
|
- binding.llWeightView.visibility = View.GONE
|
|
|
|
|
|
+ binding.llWeightView.visibility = View.INVISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.functionLayout.visibility = View.VISIBLE
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
binding.tempRingView.visibility = View.INVISIBLE
|
|
- binding.tempRingText.visibility = View.GONE
|
|
|
|
- binding.speedRingView.visibility = View.GONE
|
|
|
|
- binding.speedRingText.visibility = View.GONE
|
|
|
|
- binding.tempRingTextCooking.visibility = View.GONE
|
|
|
|
- binding.clSetTime.visibility = View.GONE
|
|
|
|
|
|
+ binding.tempRingText.visibility = View.INVISIBLE
|
|
|
|
+ binding.speedRingView.visibility = View.INVISIBLE
|
|
|
|
+ binding.speedRingText.visibility = View.INVISIBLE
|
|
|
|
+ binding.tempRingTextCooking.visibility = View.INVISIBLE
|
|
|
|
+ binding.clSetTime.visibility = View.INVISIBLE
|
|
binding.flDirection.visibility = View.VISIBLE
|
|
binding.flDirection.visibility = View.VISIBLE
|
|
setPanelViewProperty(CookSettingType.DIRECTION_SETTING)
|
|
setPanelViewProperty(CookSettingType.DIRECTION_SETTING)
|
|
}
|
|
}
|
|
@@ -1376,24 +1376,24 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
//切碎功能隐藏按钮
|
|
//切碎功能隐藏按钮
|
|
if (modeType == ModesType.TURBO.name) {
|
|
if (modeType == ModesType.TURBO.name) {
|
|
binding.apply {
|
|
binding.apply {
|
|
- btnStart.visibility = View.GONE
|
|
|
|
- btnResume.visibility = View.GONE
|
|
|
|
- btnPause.visibility = View.GONE
|
|
|
|
- btnStop.visibility = View.GONE
|
|
|
|
- btnCancel.visibility = View.GONE
|
|
|
|
- btnConfirm.visibility = View.GONE
|
|
|
|
|
|
+ btnStart.visibility = View.INVISIBLE
|
|
|
|
+ btnResume.visibility = View.INVISIBLE
|
|
|
|
+ btnPause.visibility = View.INVISIBLE
|
|
|
|
+ btnStop.visibility = View.INVISIBLE
|
|
|
|
+ btnCancel.visibility = View.INVISIBLE
|
|
|
|
+ btnConfirm.visibility = View.INVISIBLE
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
if (modeType == ModesType.WIGHT.name) {
|
|
if (modeType == ModesType.WIGHT.name) {
|
|
binding.apply {
|
|
binding.apply {
|
|
- btnStart.visibility = View.GONE
|
|
|
|
- btnResume.visibility = View.GONE
|
|
|
|
- btnPause.visibility = View.GONE
|
|
|
|
- btnStop.visibility = View.GONE
|
|
|
|
- btnCancel.visibility = View.GONE
|
|
|
|
- btnConfirm.visibility = View.GONE
|
|
|
|
|
|
+ btnStart.visibility = View.INVISIBLE
|
|
|
|
+ btnResume.visibility = View.INVISIBLE
|
|
|
|
+ btnPause.visibility = View.INVISIBLE
|
|
|
|
+ btnStop.visibility = View.INVISIBLE
|
|
|
|
+ btnCancel.visibility = View.INVISIBLE
|
|
|
|
+ btnConfirm.visibility = View.INVISIBLE
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -1402,8 +1402,8 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
DevStatus.RUNNING -> {
|
|
DevStatus.RUNNING -> {
|
|
|
|
|
|
binding.apply {
|
|
binding.apply {
|
|
- ivWeight.visibility = View.GONE
|
|
|
|
- ivTurbo.visibility = View.GONE
|
|
|
|
|
|
+ ivWeight.visibility = View.INVISIBLE
|
|
|
|
+ ivTurbo.visibility = View.INVISIBLE
|
|
btnStart.visibility = View.INVISIBLE
|
|
btnStart.visibility = View.INVISIBLE
|
|
btnStop.visibility = View.VISIBLE
|
|
btnStop.visibility = View.VISIBLE
|
|
btnResume.visibility = View.INVISIBLE
|
|
btnResume.visibility = View.INVISIBLE
|
|
@@ -1414,13 +1414,13 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
DevStatus.PAUSE -> {
|
|
DevStatus.PAUSE -> {
|
|
binding.apply {
|
|
binding.apply {
|
|
ivWeight.visibility = View.VISIBLE
|
|
ivWeight.visibility = View.VISIBLE
|
|
- ivTurbo.visibility = View.GONE
|
|
|
|
|
|
+ ivTurbo.visibility = View.INVISIBLE
|
|
btnStart.visibility = View.INVISIBLE
|
|
btnStart.visibility = View.INVISIBLE
|
|
btnResume.visibility = View.VISIBLE
|
|
btnResume.visibility = View.VISIBLE
|
|
btnPause.visibility = View.INVISIBLE
|
|
btnPause.visibility = View.INVISIBLE
|
|
btnStop.visibility = View.VISIBLE
|
|
btnStop.visibility = View.VISIBLE
|
|
- btnCancel.visibility = View.GONE
|
|
|
|
- btnConfirm.visibility = View.GONE
|
|
|
|
|
|
+ btnCancel.visibility = View.INVISIBLE
|
|
|
|
+ btnConfirm.visibility = View.INVISIBLE
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1432,8 +1432,8 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
btnStart.visibility = View.VISIBLE
|
|
btnStart.visibility = View.VISIBLE
|
|
btnPause.visibility = View.INVISIBLE
|
|
btnPause.visibility = View.INVISIBLE
|
|
btnResume.visibility = View.INVISIBLE
|
|
btnResume.visibility = View.INVISIBLE
|
|
- btnCancel.visibility = View.GONE
|
|
|
|
- btnConfirm.visibility = View.GONE
|
|
|
|
|
|
+ btnCancel.visibility = View.INVISIBLE
|
|
|
|
+ btnConfirm.visibility = View.INVISIBLE
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1447,8 +1447,9 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
if (currDevInfo.status.toByte() != DevStatus.STOP) {
|
|
if (currDevInfo.status.toByte() != DevStatus.STOP) {
|
|
binding.btnCancel.visibility = View.VISIBLE
|
|
binding.btnCancel.visibility = View.VISIBLE
|
|
binding.btnConfirm.visibility = View.VISIBLE
|
|
binding.btnConfirm.visibility = View.VISIBLE
|
|
- binding.btnResume.visibility = View.GONE
|
|
|
|
- binding.btnStart.visibility = View.GONE
|
|
|
|
|
|
+ binding.btnPause.visibility= View.INVISIBLE
|
|
|
|
+ binding.btnResume.visibility = View.INVISIBLE
|
|
|
|
+ binding.btnStart.visibility = View.INVISIBLE
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1487,8 +1488,8 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
//取消
|
|
//取消
|
|
userChanging = false
|
|
userChanging = false
|
|
CofarSDK.cancel()
|
|
CofarSDK.cancel()
|
|
- binding.btnCancel.visibility = View.GONE
|
|
|
|
- binding.btnConfirm.visibility = View.GONE
|
|
|
|
|
|
+ binding.btnCancel.visibility = View.INVISIBLE
|
|
|
|
+ binding.btnConfirm.visibility = View.INVISIBLE
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1500,9 +1501,10 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
//确认
|
|
//确认
|
|
userChanging = false
|
|
userChanging = false
|
|
//配置
|
|
//配置
|
|
|
|
+ CofarSDK.resume()
|
|
CofarSDK.confirm()
|
|
CofarSDK.confirm()
|
|
- binding.btnCancel.visibility = View.GONE
|
|
|
|
- binding.btnConfirm.visibility = View.GONE
|
|
|
|
|
|
+ binding.btnCancel.visibility = View.INVISIBLE
|
|
|
|
+ binding.btnConfirm.visibility = View.INVISIBLE
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1539,8 +1541,8 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
modeType = ModesType.WIGHT.name
|
|
modeType = ModesType.WIGHT.name
|
|
initModeData(modeType)
|
|
initModeData(modeType)
|
|
viewModel.changeStep(CookSettingType.WEIGHT)
|
|
viewModel.changeStep(CookSettingType.WEIGHT)
|
|
- binding.ivTurbo.visibility = View.GONE
|
|
|
|
- binding.ivWeight.visibility = View.GONE
|
|
|
|
|
|
+ binding.ivTurbo.visibility = View.INVISIBLE
|
|
|
|
+ binding.ivWeight.visibility = View.INVISIBLE
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources, modeType)
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources, modeType)
|
|
binding.ivBanner.background_drawable = viewModel.getBanner(modeType)
|
|
binding.ivBanner.background_drawable = viewModel.getBanner(modeType)
|
|
}
|
|
}
|
|
@@ -1557,8 +1559,8 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
viewModel.changeStep(CookSettingType.TEMP_SETTING)
|
|
viewModel.changeStep(CookSettingType.TEMP_SETTING)
|
|
initModeData(modeType)
|
|
initModeData(modeType)
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources, modeType)
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources, modeType)
|
|
- binding.ivTurbo.visibility = View.GONE
|
|
|
|
- binding.ivWeight.visibility = View.GONE
|
|
|
|
|
|
+ binding.ivTurbo.visibility = View.INVISIBLE
|
|
|
|
+ binding.ivWeight.visibility = View.INVISIBLE
|
|
binding.ivTurboView.visibility = View.VISIBLE
|
|
binding.ivTurboView.visibility = View.VISIBLE
|
|
binding.ivBanner.background_drawable = viewModel.getBanner(modeType)
|
|
binding.ivBanner.background_drawable = viewModel.getBanner(modeType)
|
|
}
|
|
}
|
|
@@ -1599,7 +1601,7 @@ class ModesDetailActivity : BaseActivity<ActivityModeDetailBinding>() {
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources, modeType)
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources, modeType)
|
|
binding.ivBanner.background_drawable = viewModel.getBanner(modeType)
|
|
binding.ivBanner.background_drawable = viewModel.getBanner(modeType)
|
|
modeChange = false
|
|
modeChange = false
|
|
- binding.ivTurboView.visibility = View.GONE
|
|
|
|
|
|
+ binding.ivTurboView.visibility = View.INVISIBLE
|
|
initModeData(modeType, cm == ModesType.WIGHT.name || cm == ModesType.TURBO.name)
|
|
initModeData(modeType, cm == ModesType.WIGHT.name || cm == ModesType.TURBO.name)
|
|
changeCommonStep()
|
|
changeCommonStep()
|
|
} else if (devInfo.status != DevStatus.STOP.toInt() && modeType != ModesType.WIGHT.name
|
|
} else if (devInfo.status != DevStatus.STOP.toInt() && modeType != ModesType.WIGHT.name
|