[自主算路验证] opt: 优化 接单 按钮置灰 样式,优化任务标题展示;
This commit is contained in:
@@ -12,7 +12,6 @@ import androidx.fragment.app.FragmentTransaction
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.module.status.MogoStatusManager
|
||||
import com.mogo.commons.module.status.StatusDescriptor
|
||||
import com.mogo.commons.mvp.IView
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
@@ -207,16 +206,6 @@ abstract class BaseTaxiTabFragment<V : IView, P : Presenter<V>> : MvpFragment<V,
|
||||
onChangeOperationStatus()
|
||||
}
|
||||
})
|
||||
// 20231128 如果设置enable=false, 需要切图,所以先不设置了
|
||||
// MogoStatusManager.getInstance()
|
||||
// .registerStatusChangedListener(TAG, StatusDescriptor.TAXI_UNMANED_DRIVER_LINE_ROUTING_VERIFY_MODE
|
||||
// ) { descriptor, isTrue ->
|
||||
// if (StatusDescriptor.TAXI_UNMANED_DRIVER_LINE_ROUTING_VERIFY_MODE == descriptor) {
|
||||
// UiThreadHandler.post {
|
||||
// module_mogo_och_operation_status.isEnabled = !isTrue
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
taxi_close_navi_icon.setOnClickListener {
|
||||
showAmapNaviToStationFragment(false)
|
||||
|
||||
@@ -167,6 +167,7 @@ class TaxiFragment : BaseTaxiTabFragment<TaxiFragment, TaxiPresenter>(),
|
||||
} else {
|
||||
showTaskFragment()
|
||||
}
|
||||
updateOperationBtnStatusOnModeChange(isTrue)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -265,6 +266,29 @@ class TaxiFragment : BaseTaxiTabFragment<TaxiFragment, TaxiPresenter>(),
|
||||
MogoStatusManager.getInstance().setTaxiUnmanedDriverTakingOrders(TAG, inOperation)
|
||||
}
|
||||
|
||||
private fun updateOperationBtnStatusOnModeChange(isRoutingVerifyMode: Boolean) {
|
||||
if (MogoStatusManager.getInstance().isTaxiUnmanedDriverTakingOrders) {
|
||||
return
|
||||
}
|
||||
module_mogo_och_operation_status.isEnabled = !isRoutingVerifyMode
|
||||
val isBtnEnable = module_mogo_och_operation_status.isEnabled
|
||||
if (isBtnEnable) {
|
||||
module_mogo_och_operation_status.setCompoundDrawablesWithIntrinsicBounds(
|
||||
resources.getDrawable(R.drawable.shape_size_operation_out),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
} else {
|
||||
module_mogo_och_operation_status.setCompoundDrawablesWithIntrinsicBounds(
|
||||
resources.getDrawable(R.drawable.shape_size_operation_out_disable),
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMapLoaded() {}
|
||||
|
||||
fun updateAutopilotStatus(status: Int) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/taxi_autopilot_text_color_normal"/>
|
||||
<item android:color="@color/taxi_autopilot_text_color_normal" android:state_enabled="true"/>
|
||||
<item android:color="@color/taxi_autopilot_text_color_disable" android:state_enabled="false"/>
|
||||
</selector>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:drawable="@drawable/taxi_out_btn_disable"
|
||||
android:width="@dimen/dp_50"
|
||||
android:height="@dimen/dp_50"/>
|
||||
</layer-list >
|
||||
@@ -20,9 +20,9 @@
|
||||
<com.mogo.och.common.module.wigets.MarqueeTextView
|
||||
android:id="@+id/taskTitleTv"
|
||||
android:layout_width="@dimen/dp_420"
|
||||
android:layout_height="@dimen/dp_132"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_45"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center_vertical"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:text="路线name路线name"
|
||||
@@ -36,10 +36,12 @@
|
||||
android:id="@+id/module_och_taxi_order_status_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:layout_marginTop="@dimen/dp_45"
|
||||
android:background="@drawable/taxi_line_bg1"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/taskTitleTv" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/taskTitleTv"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@@ -256,7 +258,7 @@
|
||||
android:textColor="@color/station_tag_color"
|
||||
android:textSize="@dimen/dp_30"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/endStationName"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/endPoint"
|
||||
app:layout_constraintTop_toBottomOf="@+id/endStationName" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user