|
@@ -369,7 +369,7 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
}
|
|
}
|
|
pressStartTime = -1L
|
|
pressStartTime = -1L
|
|
|
|
|
|
- if (viewModel.modeType != ModesType.TURBO.name && event.keyCode == PRESS_DOWN_KEY_CODE && canStart) {
|
|
|
|
|
|
+ if (modeType != ModesType.WIGHT.name && modeType != ModesType.TURBO.name && event.keyCode == PRESS_DOWN_KEY_CODE && canStart) {
|
|
//非turbo模式
|
|
//非turbo模式
|
|
if (userChanging && currDevInfo.status.toByte() != DevStatus.STOP) {
|
|
if (userChanging && currDevInfo.status.toByte() != DevStatus.STOP) {
|
|
//用户调节中
|
|
//用户调节中
|
|
@@ -384,6 +384,9 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (modeType == ModesType.WIGHT.name) {
|
|
|
|
+ weightClearClick();
|
|
|
|
+ }
|
|
canStart = true
|
|
canStart = true
|
|
return super.onKeyUp(keyCode, event)
|
|
return super.onKeyUp(keyCode, event)
|
|
}
|
|
}
|
|
@@ -1706,8 +1709,21 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
binding.ivWeight.visibility = View.GONE
|
|
binding.ivWeight.visibility = View.GONE
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources)
|
|
binding.tvModeName.text = viewModel.getModeTitle(resources)
|
|
|
|
|
|
|
|
+ val workMode = ConfigUtils.getMode(modeType)
|
|
if (!isNightTheme()) {
|
|
if (!isNightTheme()) {
|
|
- Glide.with(this).load(viewModel.getBanner()).into(binding.ivBanner)
|
|
|
|
|
|
+ if (workMode == null) {
|
|
|
|
+ Glide.with(this).load(com.develop.common.R.drawable.ic_mode_diy)
|
|
|
|
+ .into(binding.ivBanner)
|
|
|
|
+ } else {
|
|
|
|
+ Glide.with(this).load(
|
|
|
|
+ resources.getIdentifier(
|
|
|
|
+ workMode.bg,
|
|
|
|
+ "drawable",
|
|
|
|
+ this.packageName
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ .into(binding.ivBanner)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1728,8 +1744,21 @@ class ModesDetailActivity : CommonBVMActivity<ActivityModeDetailBinding, ModesVi
|
|
binding.ivWeight.visibility = View.GONE
|
|
binding.ivWeight.visibility = View.GONE
|
|
Log.d("dddddd", "llTurboView===VISIBLE")
|
|
Log.d("dddddd", "llTurboView===VISIBLE")
|
|
binding.llTurboView.visibility = View.VISIBLE
|
|
binding.llTurboView.visibility = View.VISIBLE
|
|
|
|
+ val workMode = ConfigUtils.getMode(modeType)
|
|
if (!isNightTheme()) {
|
|
if (!isNightTheme()) {
|
|
- Glide.with(this).load(viewModel.getBanner()).into(binding.ivBanner)
|
|
|
|
|
|
+ if (workMode == null) {
|
|
|
|
+ Glide.with(this).load(com.develop.common.R.drawable.ic_mode_diy)
|
|
|
|
+ .into(binding.ivBanner)
|
|
|
|
+ } else {
|
|
|
|
+ Glide.with(this).load(
|
|
|
|
+ resources.getIdentifier(
|
|
|
|
+ workMode.bg,
|
|
|
|
+ "drawable",
|
|
|
|
+ this.packageName
|
|
|
|
+ )
|
|
|
|
+ )
|
|
|
|
+ .into(binding.ivBanner)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|