Browse Source

提交人:jtm
提交内容:优化布局,bug修复

江天明 2 years ago
parent
commit
639894ef5d

+ 3 - 2
BusinessStep/src/main/java/com/develop/step/viewmodel/CookStepViewModel.kt

@@ -141,14 +141,15 @@ class CookStepViewModel:BaseViewModel() {
     fun getStepCombineText(): CharSequence {
         val spanBuilder = SpannableStringBuilder()
         for (step in allSteps) {
+            val description = step.source.description ?: ""
             if (step == displayStep()) {
                 spanBuilder.append(
-                    step.source.description,
+                    description,
                     ForegroundColorSpan(Color.parseColor("#E60012")),
                     Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
                 )
             } else {
-                spanBuilder.append(step.source.description)
+                spanBuilder.append(description)
             }
             spanBuilder.append("\n\n")
         }

+ 2 - 2
BusinessStep/src/main/res/layout/item_cook_controller.xml

@@ -391,11 +391,11 @@
         android:layout_height="wrap_content"
         android:orientation="vertical"
         android:gravity="center_horizontal"
-        android:visibility="gone"
+        android:visibility="visible"
         app:layout_constraintTop_toTopOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
-        android:layout_marginTop="@dimen/convert_210px">
+        android:layout_marginTop="@dimen/convert_120px">
 
         <View
             android:layout_width="@dimen/convert_110px"