|
@@ -63,6 +63,7 @@ object FloatWindowManager {
|
|
|
}
|
|
|
|
|
|
fun showStepFlowWindow(event: CookStepEvent) {
|
|
|
+ hideStepFlowWindow()
|
|
|
recipeNumber = event.recipeNumber
|
|
|
coverPath = event.coverPath
|
|
|
step = event.step
|
|
@@ -77,7 +78,13 @@ object FloatWindowManager {
|
|
|
.setLayout(R.layout.step_float_window) {
|
|
|
ivFood = it.findViewById(R.id.iv_food)
|
|
|
tvStep = it.findViewById(R.id.tv_step_count)
|
|
|
- ivFood?.load(coverPath)
|
|
|
+
|
|
|
+ if(coverPath is Int){
|
|
|
+ ivFood?.setImageResource(coverPath as Int)
|
|
|
+ }else{
|
|
|
+ ivFood?.load(coverPath)
|
|
|
+ }
|
|
|
+
|
|
|
if (isMode) {
|
|
|
//当前是模式
|
|
|
tvStep?.text = modeName
|
|
@@ -88,7 +95,7 @@ object FloatWindowManager {
|
|
|
it.findViewById<RelativeLayout>(R.id.content_layout).setOnClickListener {
|
|
|
if (isMode) {
|
|
|
globalApp().navigateTo(Screens.Cook.COOK_MODES) {
|
|
|
- withString(MODE_TYPE, modeName)
|
|
|
+ withString(MODE_TYPE, event.modeType)
|
|
|
}
|
|
|
} else {
|
|
|
globalApp().navigateTo(Screens.Cook.COOK_STEP2) {
|
|
@@ -122,9 +129,10 @@ object FloatWindowManager {
|
|
|
if (runningRecipeId != null && runningRecipeId?.isNotEmpty() == true) {
|
|
|
recipeNumber = runningRecipeId
|
|
|
tvStep?.text = modeName
|
|
|
- } else {
|
|
|
step = if (runningRecipeExt == "") 0 else runningRecipeExt.toInt()
|
|
|
tvStep?.text = "Step ${step + 1}"
|
|
|
+ } else {
|
|
|
+ //ivFood?.load(coverPath)
|
|
|
}
|
|
|
if (status.toByte() == DevStatus.STOP) {
|
|
|
hideStepFlowWindow()
|