[6.7.0]
[fea] [runningtask]
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
package com.mogo.och.weaknet.callback;
|
||||
|
||||
import com.mogo.och.data.bean.BusStationBean;
|
||||
import com.mogo.och.weaknet.bean.BusQueryLineTaskResponse;
|
||||
import com.mogo.och.weaknet.bean.BusQueryLinesResponse;
|
||||
import com.mogo.och.weaknet.database.bean.TaskDataBean;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -11,10 +16,14 @@ import java.util.List;
|
||||
*/
|
||||
public interface IBusLinesCallback {
|
||||
default void onBusLinesChange(List<BusQueryLinesResponse.Result> data){}
|
||||
void onChangeLineIdSuccess();
|
||||
default void onChangeLineIdSuccess(){}
|
||||
default void onBusLineTasks(List<BusQueryLineTaskResponse.Result> o){}
|
||||
|
||||
void onRefreshSuccess(long currentTimeStamp);
|
||||
default void onRefreshSuccess(long currentTimeStamp){}
|
||||
|
||||
void onChangeLineIdFail();
|
||||
default void onChangeLineIdFail(){}
|
||||
|
||||
default void onNoRunningTask(){}
|
||||
|
||||
default void onRunningTask(){}
|
||||
}
|
||||
|
||||
@@ -323,6 +323,9 @@ object BusLineModel {
|
||||
val contraiInfoTemp = ContraiRepository.queryAutopilotInfoByLineid(it)
|
||||
ContrailDataBean.save2Common(contraiInfoTemp)
|
||||
}
|
||||
mBusLinesCallbackMap.forEach { callback->
|
||||
callback.value.onRunningTask()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,7 +344,7 @@ object BusLineModel {
|
||||
it.status = TaskDataBean.used
|
||||
}
|
||||
TaskRepository.addOrUpdate(*tempList.toTypedArray())
|
||||
OrderModel.queryBusRoutes()
|
||||
loadStartedTaskAndDefaultInfo()
|
||||
OchChainLogManager.writeChainLogDb("加载任务", "异常情况:多个正在进行的任务 task:${runningTaskInfo} event:${queryLastData.taskId}有一个和event表对应使用相同的一个 另一个置为已使用")
|
||||
return
|
||||
}
|
||||
@@ -359,6 +362,11 @@ object BusLineModel {
|
||||
mContext?.let { contextit ->
|
||||
OrderServiceManager.queryBusRoutes(contextit,object :OchCommonServiceCallback<BusRoutesResponse>{
|
||||
override fun onSuccess(response: BusRoutesResponse?) {
|
||||
if(response?.data == null){
|
||||
mBusLinesCallbackMap.forEach { callback->
|
||||
callback.value.onNoRunningTask()
|
||||
}
|
||||
}
|
||||
response?.data?.let {
|
||||
if (!it.sites.isNullOrEmpty()&&it.sites.size>1) {
|
||||
val queryTaskById = TaskRepository.queryTaskById(it.taskId.toLong())
|
||||
|
||||
@@ -320,30 +320,6 @@ object OrderModel {
|
||||
BusLineModel.sendTaskDetailsToClients()
|
||||
}
|
||||
|
||||
/**
|
||||
* 离站上报成功后渲染站点
|
||||
* 服务端返回的OchBusRoutesResult逻辑, 离开站为当前站, 到达下一站后才会将下一站置为当前站,
|
||||
* 车机端展示是离开当前站,下一站设置为当前站, 所以服务端数据回来要做处理,不能直接渲染
|
||||
*/
|
||||
private fun leaveStationSuccess() {
|
||||
onStartAutopilot()
|
||||
LineManager.getStations { start, end ->
|
||||
leaveTTSTips(end.name, end.nameKr)
|
||||
//给bus外屏发送
|
||||
LedScreenManager.sendTripInfo2Led(
|
||||
LedScreenManager.LEAVE_STATION,
|
||||
LineManager.lineInfos!!.lineName,
|
||||
start.name,
|
||||
end.name,
|
||||
BusLineModel.isLastStation()==true
|
||||
)
|
||||
}
|
||||
|
||||
BusLineModel.leaveStation()
|
||||
|
||||
updateBusStatus()
|
||||
}
|
||||
|
||||
private fun onStartAutopilot() {
|
||||
//开启自动驾驶 2.10.0: 如果自动驾驶状态下开启, 非自动驾驶状态下不开启,需手动点击自动驾驶按钮开启
|
||||
isGoingToNextStation = true
|
||||
@@ -468,18 +444,6 @@ object OrderModel {
|
||||
updateBusStatus()
|
||||
}
|
||||
|
||||
/**
|
||||
* 离站上报
|
||||
*/
|
||||
private fun leaveStation() {
|
||||
if (LineManager.endStation==null) {
|
||||
OchChainLogManager.writeChainLog("滑动出发", "未设置终点坐标")
|
||||
return
|
||||
}
|
||||
isArrivedStation = false
|
||||
leaveStationSuccess()
|
||||
}
|
||||
|
||||
//车站10s后播报
|
||||
private fun leaveTTSTips(nextStation: String?, nextStationKr: String?) {
|
||||
UiThreadHandler.postDelayed({ //延迟10s播报
|
||||
@@ -518,7 +482,27 @@ object OrderModel {
|
||||
abortTask()
|
||||
return
|
||||
}
|
||||
leaveStation()
|
||||
if (LineManager.endStation==null) {
|
||||
OchChainLogManager.writeChainLog("滑动出发", "未设置终点坐标")
|
||||
return
|
||||
}
|
||||
isArrivedStation = false
|
||||
onStartAutopilot()
|
||||
LineManager.getStations { start, end ->
|
||||
leaveTTSTips(end.name, end.nameKr)
|
||||
//给bus外屏发送
|
||||
LedScreenManager.sendTripInfo2Led(
|
||||
LedScreenManager.LEAVE_STATION,
|
||||
LineManager.lineInfos!!.lineName,
|
||||
start.name,
|
||||
end.name,
|
||||
BusLineModel.isLastStation()==true
|
||||
)
|
||||
}
|
||||
|
||||
BusLineModel.leaveStation()
|
||||
|
||||
updateBusStatus()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -214,7 +214,7 @@ class BusPresenter(view: ShuttleFragment?) : Presenter<ShuttleFragment?>(view),
|
||||
override fun onStatusChange(currentStatus: LoginStatusEnum) {
|
||||
d(SceneConstant.M_BUS + TAG, " loginStatus =" + isLogin())
|
||||
if (isLogin()) {
|
||||
OrderModel.queryBusRoutes()
|
||||
//OrderModel.queryBusRoutes()
|
||||
} else {
|
||||
BusTrajectoryManager.getInstance().stopTrajReqLoop()
|
||||
BusTrajectoryManager.getInstance().stopTrajReqLoop()
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.mogo.och.weaknet.bean.BusQueryLinesResponse
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_switch_biz.view.loading_biz
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_switch_biz.view.swtichLine
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_switch_biz.view.swtichTask
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_switch_biz.view.taskRunning
|
||||
|
||||
class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallback {
|
||||
|
||||
@@ -66,60 +67,55 @@ class SwitchBizView: WindowRelativeLayout, SwtichBizeModel.SwtichLineViewCallbac
|
||||
* 初始化数据
|
||||
*/
|
||||
override fun loadLineData() {
|
||||
showLoadingView()
|
||||
swtichLine.loadingDatas()
|
||||
}
|
||||
|
||||
|
||||
override fun showSwitchTaskByLineInfo(lineInfo: BusQueryLinesResponse.Result) {
|
||||
// 展示loading
|
||||
showLoadingView()
|
||||
swtichTask.queryTaskByLineInfo(lineInfo)
|
||||
}
|
||||
|
||||
// 展示选择任务页面
|
||||
override fun showSwitchTaskInfo() {
|
||||
val endLoading = System.currentTimeMillis()
|
||||
val dex = endLoading - startLoading
|
||||
|
||||
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
|
||||
CallerLogger.d(TAG,"展示线路任务 lading 展示了 ${dex}毫秒")
|
||||
if(dex <100){
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
swtichLine.visibility = GONE
|
||||
swtichTask.visibility = VISIBLE
|
||||
},100-dex,ThreadUtils.MODE.QUEUE)
|
||||
}else{
|
||||
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
swtichLine.visibility = GONE
|
||||
swtichTask.visibility = VISIBLE
|
||||
}
|
||||
taskRunning.visibility = GONE
|
||||
},dex,ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
|
||||
// 展示选择线路页面
|
||||
override fun showSwtichLineView() {
|
||||
val endLoading = System.currentTimeMillis()
|
||||
val dex = endLoading - startLoading
|
||||
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
|
||||
CallerLogger.d(TAG,"展示线路 lading 展示了 ${dex}毫秒")
|
||||
if(dex <100){
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
swtichLine.visibility = VISIBLE
|
||||
swtichTask.visibility = GONE
|
||||
},100-dex,ThreadUtils.MODE.QUEUE)
|
||||
}else{
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
swtichLine.visibility = VISIBLE
|
||||
swtichTask.visibility = GONE
|
||||
}
|
||||
taskRunning.visibility = GONE
|
||||
},dex,ThreadUtils.MODE.QUEUE)
|
||||
|
||||
}
|
||||
|
||||
fun showSwitchTaskView(){
|
||||
|
||||
// 展示正在进行的任务
|
||||
override fun loadRunningTask() {
|
||||
val endLoading = System.currentTimeMillis()
|
||||
val dex = (100-(endLoading - startLoading)).takeIf { it>=0 }?:0
|
||||
CallerLogger.d(TAG,"展示线路 lading 展示了 ${dex}毫秒")
|
||||
ThreadUtils.runOnUiThreadDelayed({
|
||||
loading_biz.visibility = GONE
|
||||
swtichLine.visibility = GONE
|
||||
swtichTask.visibility = GONE
|
||||
taskRunning.visibility = VISIBLE
|
||||
taskRunning.showRunningTaskInfo()
|
||||
},dex,ThreadUtils.MODE.QUEUE)
|
||||
}
|
||||
fun showRunningTaskView(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package com.mogo.och.weaknet.ui.bizswitch
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.data.bean.BusStationBean
|
||||
import com.mogo.och.weaknet.bean.BusQueryLinesResponse
|
||||
import com.mogo.och.weaknet.callback.IBusLinesCallback
|
||||
import com.mogo.och.weaknet.database.bean.TaskDataBean
|
||||
import com.mogo.och.weaknet.model.BusLineModel
|
||||
|
||||
/**
|
||||
@@ -10,22 +14,27 @@ import com.mogo.och.weaknet.model.BusLineModel
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
class SwtichBizeModel : ViewModel() {
|
||||
class SwtichBizeModel : ViewModel(), IBusLinesCallback {
|
||||
|
||||
private val TAG = SwtichBizeModel::class.java.simpleName
|
||||
|
||||
private var viewCallback:SwtichLineViewCallback?=null
|
||||
private var viewCallback: SwtichLineViewCallback? = null
|
||||
|
||||
|
||||
override fun onCleared() {
|
||||
BusLineModel.setBusLinesCallback(TAG, null)
|
||||
}
|
||||
|
||||
fun setDistanceCallback(viewCallback:SwtichLineViewCallback){
|
||||
fun setDistanceCallback(viewCallback: SwtichLineViewCallback) {
|
||||
this.viewCallback = viewCallback
|
||||
this.viewCallback?.loadLineData()
|
||||
BusLineModel.setBusLinesCallback(TAG, this)
|
||||
this.viewCallback?.showLoadingView()
|
||||
ThreadUtils.getIoPool().execute {
|
||||
BusLineModel.loadStartedTaskAndDefaultInfo()
|
||||
}
|
||||
}
|
||||
|
||||
fun loadingSwitchTask(lineInfo:BusQueryLinesResponse.Result){
|
||||
fun loadingSwitchTask(lineInfo: BusQueryLinesResponse.Result) {
|
||||
viewCallback?.showSwitchTaskByLineInfo(lineInfo)
|
||||
}
|
||||
|
||||
@@ -34,9 +43,11 @@ class SwtichBizeModel : ViewModel() {
|
||||
}
|
||||
|
||||
fun showSwitchLineInfo() {
|
||||
viewCallback?.showLoadingView()
|
||||
viewCallback?.loadLineData()
|
||||
}
|
||||
fun showSwitchLineInfoResult(){
|
||||
|
||||
fun showSwitchLineInfoResult() {
|
||||
viewCallback?.showSwtichLineView()
|
||||
}
|
||||
|
||||
@@ -44,13 +55,24 @@ class SwtichBizeModel : ViewModel() {
|
||||
|
||||
}
|
||||
|
||||
interface SwtichLineViewCallback{
|
||||
interface SwtichLineViewCallback {
|
||||
fun showSwtichLineView()
|
||||
fun showLoadingView()
|
||||
fun showSwitchTaskByLineInfo(lineInfo: BusQueryLinesResponse.Result)
|
||||
fun showSwitchTaskInfo()
|
||||
fun loadLineData()
|
||||
fun loadRunningTask()
|
||||
}
|
||||
|
||||
|
||||
override fun onNoRunningTask() {
|
||||
this.viewCallback?.loadLineData()
|
||||
CallerLogger.d(TAG,"没有任务去加载线路")
|
||||
}
|
||||
|
||||
override fun onRunningTask() {
|
||||
this.viewCallback?.loadRunningTask()
|
||||
CallerLogger.d(TAG,"有任务去加载正在执行的任务")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.SpacesItemDecoration
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -54,6 +55,8 @@ class SwitchLineView: WindowRelativeLayout, SwtichLineModel.SwtichLineViewCallba
|
||||
|
||||
private lateinit var linearLayoutManager:LinearLayoutManager
|
||||
|
||||
private var animatorStart = System.currentTimeMillis()
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.shuttle_weak_switch_line, this, true)
|
||||
initView()
|
||||
@@ -79,6 +82,7 @@ class SwitchLineView: WindowRelativeLayout, SwtichLineModel.SwtichLineViewCallba
|
||||
|
||||
aciv_refresh_task.onClick {
|
||||
viewModel?.refreshTask()
|
||||
animatorStart = System.currentTimeMillis()
|
||||
if(animator==null) {
|
||||
animator = ObjectAnimator.ofFloat(aciv_refresh_task, "rotation", 0f, 360f)
|
||||
animator?.setDuration(1000) // 设置动画持续时间
|
||||
@@ -93,6 +97,7 @@ class SwitchLineView: WindowRelativeLayout, SwtichLineModel.SwtichLineViewCallba
|
||||
* 初始化数据
|
||||
*/
|
||||
fun loadingDatas() {
|
||||
CallerLogger.d(TAG,"加载线路去")
|
||||
viewModel?.queryBusLines()
|
||||
viewModel?.setRefreshTime()
|
||||
}
|
||||
@@ -120,6 +125,7 @@ class SwitchLineView: WindowRelativeLayout, SwtichLineModel.SwtichLineViewCallba
|
||||
showNoData(false)
|
||||
mAdapter.setDataList(data)
|
||||
}
|
||||
CallerLogger.d(TAG,"加载线路成功")
|
||||
viewbizModel?.showSwitchLineInfoResult()
|
||||
}
|
||||
|
||||
@@ -144,12 +150,14 @@ class SwitchLineView: WindowRelativeLayout, SwtichLineModel.SwtichLineViewCallba
|
||||
}
|
||||
|
||||
override fun refreshDate(formatLongToString: String?) {
|
||||
UiThreadHandler.post({
|
||||
val endTime = System.currentTimeMillis()
|
||||
val dex = (1000-(endTime - animatorStart)).takeIf { it>=0 }?:0
|
||||
UiThreadHandler.postDelayed({
|
||||
formatLongToString?.let {
|
||||
actv_last_refresh_date.text = ResourcesUtils.getString(R.string.bus_refresh_time,it)
|
||||
animator?.cancel()
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
},dex,UiThreadHandler.MODE.QUEUE,)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -86,13 +86,6 @@ class SwitchTaskView: WindowRelativeLayout, SwtichTaskModel.SwtichLineViewCallba
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
private fun initDatas() {
|
||||
viewModel?.queryBusLines()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
|
||||
@@ -103,13 +96,12 @@ class SwitchTaskView: WindowRelativeLayout, SwtichTaskModel.SwtichLineViewCallba
|
||||
ViewModelProvider(it).get(SwtichBizeModel::class.java)
|
||||
}
|
||||
viewModel?.setDistanceCallback(this)
|
||||
initDatas()
|
||||
}
|
||||
|
||||
fun queryTaskByLineInfo(lineInfo: BusQueryLinesResponse.Result) {
|
||||
viewModel?.queryBusLineTasksById(lineInfo)
|
||||
busLineName.text = lineInfo.name
|
||||
actvLineEndStationName.text = lineInfo.endSiteName
|
||||
actvLineEndStationName.text = "往${lineInfo.endSiteName}方向"
|
||||
}
|
||||
|
||||
override fun showTaskByLineIdResult(taskList: MutableList<BusQueryLineTaskResponse.Result>) {
|
||||
|
||||
@@ -35,10 +35,6 @@ class SwtichTaskModel : ViewModel(), IBusLinesCallback {
|
||||
BusLineModel.setBusLinesCallback(TAG,this)
|
||||
}
|
||||
|
||||
fun queryBusLines() {
|
||||
BusLineModel.queryBusLines()
|
||||
}
|
||||
|
||||
fun queryBusLineTasksById(lineInfo: BusQueryLinesResponse.Result) {
|
||||
tasksBelongLine = lineInfo
|
||||
BusLineModel.queryBusLineTasksById(lineInfo.lineId)
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.mogo.och.weaknet.ui.taskrunning
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.appcompat.widget.AppCompatImageView
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.DiffUtil.Callback
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import com.mogo.och.data.bean.BusStationBean
|
||||
import com.mogo.och.weaknet.bean.BusQueryLinesResponse
|
||||
import com.mogo.och.shuttle.weaknet.R
|
||||
import com.mogo.och.weaknet.bean.BusQueryLineTaskResponse
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
/**
|
||||
* 路线列表adapter
|
||||
*/
|
||||
class TaskRunningAdapter(
|
||||
private val mContext: Context,
|
||||
val mData: MutableList<BusStationBean>
|
||||
) : RecyclerView.Adapter<TaskRunningAdapter.TaskRunningViewHolder>() {
|
||||
|
||||
companion object{
|
||||
const val TAG = "TaskRunningAdapter"
|
||||
}
|
||||
private var startStationIndex:Int = -1
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun setDataList(dataList: List<BusStationBean>, startStationIndex:Int) {
|
||||
this.startStationIndex = startStationIndex
|
||||
this.mData.clear()
|
||||
this.mData.addAll(dataList)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(
|
||||
parent: ViewGroup,
|
||||
viewType: Int
|
||||
): TaskRunningViewHolder {
|
||||
val view = LayoutInflater.from(mContext).inflate(
|
||||
R.layout.shuttle_weak_running_station_list_item, parent, false
|
||||
)
|
||||
return TaskRunningViewHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: TaskRunningViewHolder, position: Int) {
|
||||
val currentPosition = holder.bindingAdapterPosition
|
||||
val line = mData[currentPosition]
|
||||
holder.actvStationName.text = line.name
|
||||
|
||||
if(currentPosition<startStationIndex){
|
||||
holder.actvStationName.setTextSize(TypedValue.COMPLEX_UNIT_PX, AutoSizeUtils.dp2px(mContext,40f).toFloat())
|
||||
holder.actvStationName.setTextColor(ResourcesUtils.getColor(R.color.bus_color_4dffffff))
|
||||
holder.itemView.background = null
|
||||
}else if(currentPosition==startStationIndex){
|
||||
holder.actvStationName.setTextSize(TypedValue.COMPLEX_UNIT_PX, AutoSizeUtils.dp2px(mContext,45f).toFloat())
|
||||
holder.actvStationName.setTextColor(ResourcesUtils.getColor(R.color.bus_color_2EACFF))
|
||||
holder.itemView.setBackgroundResource(R.drawable.bus_task_current_station_bg)
|
||||
}else{
|
||||
holder.actvStationName.setTextColor(ResourcesUtils.getColor(R.color.white))
|
||||
holder.actvStationName.setTextSize(TypedValue.COMPLEX_UNIT_PX, AutoSizeUtils.dp2px(mContext,40f).toFloat())
|
||||
holder.itemView.background = null
|
||||
}
|
||||
|
||||
when (currentPosition) {
|
||||
0 -> {
|
||||
holder.acivStationHeadBig.visibility = View.VISIBLE
|
||||
holder.acivStationHead.visibility = View.INVISIBLE
|
||||
holder.acivStationHeadBig.setImageResource(R.drawable.bus_runnint_task_start)
|
||||
}
|
||||
mData.size-1 -> {
|
||||
holder.acivStationHeadBig.visibility = View.VISIBLE
|
||||
holder.acivStationHead.visibility = View.INVISIBLE
|
||||
holder.acivStationHeadBig.setImageResource(R.drawable.bus_runnint_task_end)
|
||||
}
|
||||
else -> {
|
||||
holder.acivStationHeadBig.visibility = View.GONE
|
||||
holder.acivStationHead.visibility = View.VISIBLE
|
||||
holder.acivStationHead.setImageResource(R.drawable.bus_runnint_task_middle)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int {
|
||||
return mData.size
|
||||
}
|
||||
|
||||
class TaskRunningViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
val actvStationName: AppCompatTextView = itemView.findViewById(R.id.actv_station_name)//站点名称
|
||||
val acivStationHead: AppCompatImageView = itemView.findViewById(R.id.aciv_station_head)//线路标识
|
||||
val acivStationHeadBig: AppCompatImageView = itemView.findViewById(R.id.aciv_station_head_big)//线路标识
|
||||
val actvWriteOffCount: AppCompatTextView = itemView.findViewById(R.id.actv_write_off_count) //此战核销的人数
|
||||
}
|
||||
|
||||
interface LineItemClickListener {
|
||||
fun onItemClick(position: Int,close:Boolean)
|
||||
}
|
||||
|
||||
inner class MyDiffCallback(private val oldData:List<BusStationBean>, private val newData:List<BusStationBean>):
|
||||
Callback(){
|
||||
override fun getOldListSize(): Int {
|
||||
return oldData.size
|
||||
}
|
||||
|
||||
override fun getNewListSize(): Int {
|
||||
return newData.size
|
||||
}
|
||||
|
||||
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
||||
val oldItem = oldData[oldItemPosition]
|
||||
val newItem = newData[newItemPosition]
|
||||
return oldItem == newItem
|
||||
}
|
||||
|
||||
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
||||
val oldItem = oldData[oldItemPosition]
|
||||
val newItem = newData[newItemPosition]
|
||||
return oldItem == newItem
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.mogo.och.weaknet.ui.taskrunning
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.weaknet.bean.BusQueryLinesResponse
|
||||
import com.mogo.och.weaknet.callback.IBusLinesCallback
|
||||
import com.mogo.och.weaknet.model.BusLineModel
|
||||
import com.mogo.och.weaknet.model.BusLineModel.executableChangeTime
|
||||
import com.mogo.och.weaknet.model.OrderModel
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description BadCase录包管理页面
|
||||
* @since: 2022/12/15
|
||||
*/
|
||||
class TaskRunningModel : ViewModel() {
|
||||
|
||||
private val TAG = TaskRunningModel::class.java.simpleName
|
||||
|
||||
private var viewCallback:SwtichLineViewCallback?=null
|
||||
|
||||
|
||||
override fun onCleared() {
|
||||
}
|
||||
|
||||
fun setDistanceCallback(viewCallback:SwtichLineViewCallback){
|
||||
this.viewCallback = viewCallback
|
||||
}
|
||||
|
||||
fun leaveStation() {
|
||||
OrderModel.autoDriveToNextStation()
|
||||
}
|
||||
|
||||
interface SwtichLineViewCallback{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.mogo.och.weaknet.ui.taskrunning
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.view.SpacesItemDecoration
|
||||
import com.mogo.och.common.module.manager.autopilot.line.LineManager
|
||||
import com.mogo.och.shuttle.weaknet.R
|
||||
import com.mogo.och.weaknet.model.BusLineModel
|
||||
import com.mogo.och.weaknet.ui.bizswitch.SwtichBizeModel
|
||||
import com.mogo.och.weaknet.ui.switchline.SwitchLineAdapter
|
||||
import com.mogo.och.weaknet.view.BizLeaveStationView.SlideListener
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_switch_line.view.switch_line_rv
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.aciv_task_leave_station_slide_bg
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.actv_running_task_last_station
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.actv_running_task_time
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.bus_task_running_line_name
|
||||
import kotlinx.android.synthetic.main.shuttle_weak_task_running.view.rl_running_task_station_list
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
|
||||
class TaskRunningView: ConstraintLayout, TaskRunningModel.SwtichLineViewCallback {
|
||||
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
|
||||
companion object {
|
||||
const val TAG = "TaskRunningView"
|
||||
}
|
||||
|
||||
private var viewModel:TaskRunningModel?=null
|
||||
private var viewbizModel:SwtichBizeModel?=null
|
||||
|
||||
private lateinit var mAdapter: TaskRunningAdapter
|
||||
|
||||
private var animator:ObjectAnimator?=null
|
||||
|
||||
|
||||
private lateinit var linearLayoutManager:LinearLayoutManager
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.shuttle_weak_task_running, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
linearLayoutManager = LinearLayoutManager(context)
|
||||
rl_running_task_station_list.setLayoutManager(linearLayoutManager)
|
||||
mAdapter = TaskRunningAdapter(context, mutableListOf())
|
||||
rl_running_task_station_list.addItemDecoration(
|
||||
SpacesItemDecoration(
|
||||
AutoSizeUtils.dp2px(context,20f)
|
||||
)
|
||||
)
|
||||
rl_running_task_station_list.setAdapter(mAdapter)
|
||||
aciv_task_leave_station_slide_bg.setSlideListener(object : SlideListener{
|
||||
override fun slideEnd() {
|
||||
viewModel?.leaveStation()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it).get(TaskRunningModel::class.java)
|
||||
}
|
||||
viewbizModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it).get(SwtichBizeModel::class.java)
|
||||
}
|
||||
|
||||
viewModel?.setDistanceCallback(this)
|
||||
}
|
||||
|
||||
fun showRunningTaskInfo() {
|
||||
bus_task_running_line_name.text = LineManager.lineInfos?.lineName?:""
|
||||
actv_running_task_time.text = BusLineModel.getTaskTime()
|
||||
BusLineModel.stationList?.takeIf { it.size>2 }?.let {
|
||||
actv_running_task_last_station.text = "往${it.last().name ?: ""}"
|
||||
mAdapter.setDataList(it,BusLineModel.startStationIndex)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.mogo.och.weaknet.view
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.constraintlayout.widget.ConstraintSet
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.och.shuttle.weaknet.R
|
||||
|
||||
class BizLeaveStationView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
companion object {
|
||||
const val TAG = "LoadingMapStatusView"
|
||||
}
|
||||
|
||||
|
||||
private var initialX = 0f
|
||||
private var initialY = 0f
|
||||
private val tempSet = ConstraintSet()
|
||||
|
||||
private var draggableButton: AppCompatTextView
|
||||
|
||||
private var slideListener:SlideListener?=null
|
||||
|
||||
fun setSlideListener(slideListener:SlideListener){
|
||||
this.slideListener = slideListener
|
||||
}
|
||||
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.shuttle_weak_task_leave_station_view, this, true)
|
||||
draggableButton = findViewById(R.id.actv_draggable)
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerLogger.d(TAG,"onAttachedToWindow")
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 为该组件的触碰事件重写事件处理方法
|
||||
*/
|
||||
override fun onTouchEvent(event: MotionEvent?): Boolean {
|
||||
when (event?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
initialX = event.rawX;
|
||||
initialY = event.rawY;
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
val dx = event.rawX - initialX;
|
||||
val dy = event.rawY - initialY;
|
||||
initialX = event.rawX;
|
||||
initialY = event.rawY;
|
||||
|
||||
if(draggableButton.translationX<0){
|
||||
tempSet.clone(this)
|
||||
tempSet.setTranslationX(draggableButton.id, 0f)
|
||||
tempSet.applyTo(this)
|
||||
}else if(draggableButton.translationX>=0&&draggableButton.translationX<=width-draggableButton.width){
|
||||
tempSet.clone(this)
|
||||
val dex = (draggableButton.translationX + dx).takeIf { it>=0 }?:0f
|
||||
val newDex = dex.takeIf { it<=width-draggableButton.width }?:(width-draggableButton.width).toFloat()
|
||||
tempSet.setTranslationX(draggableButton.id, newDex)
|
||||
tempSet.applyTo(this)
|
||||
}else{
|
||||
tempSet.clone(this)
|
||||
val dex = (draggableButton.translationX + dx).takeIf { it<=width-draggableButton.width }?:(width-draggableButton.width).toFloat()
|
||||
tempSet.setTranslationX(draggableButton.id, dex)
|
||||
tempSet.applyTo(this)
|
||||
}
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
if(draggableButton.translationX<(width-draggableButton.width)){
|
||||
ObjectAnimator.ofFloat(
|
||||
draggableButton, "translationX", draggableButton.translationX,
|
||||
0f
|
||||
).apply {
|
||||
duration = 100
|
||||
}.start()
|
||||
}else if (draggableButton.translationX>=(width-draggableButton.width)){
|
||||
slideListener?.slideEnd()
|
||||
}else{
|
||||
ObjectAnimator.ofFloat(
|
||||
draggableButton, "translationX", draggableButton.translationX,
|
||||
0f
|
||||
).apply {
|
||||
duration = 100
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
if(isVisible){
|
||||
ObjectAnimator.ofFloat(
|
||||
draggableButton, "translationX", draggableButton.translationX,
|
||||
0f
|
||||
).apply {
|
||||
duration = 100
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerLogger.d(TAG,"onDetachedFromWindow")
|
||||
}
|
||||
|
||||
interface SlideListener{
|
||||
fun slideEnd()
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.weaknet.ui.loading
|
||||
package com.mogo.och.weaknet.view
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.weaknet.ui.loading
|
||||
package com.mogo.och.weaknet.view
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.content.Context
|
||||
BIN
OCH/shuttle/driver_weaknet/src/main/res/drawable-nodpi/bus_runnint_task_end.png
Executable file
BIN
OCH/shuttle/driver_weaknet/src/main/res/drawable-nodpi/bus_runnint_task_end.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 610 B |
BIN
OCH/shuttle/driver_weaknet/src/main/res/drawable-nodpi/bus_runnint_task_past.png
Executable file
BIN
OCH/shuttle/driver_weaknet/src/main/res/drawable-nodpi/bus_runnint_task_past.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 261 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_30"/>
|
||||
<solid android:color="@color/bus_color_4dffffff"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_30"/>
|
||||
<gradient android:startColor="@color/bus_color_19E6D4"
|
||||
android:angle="-100"
|
||||
android:endColor="@color/bus_color_198BF6"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
tools:background="@drawable/bus_switch_line_selector">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_station_head"
|
||||
android:src="@drawable/bus_switch_line_adapter_point"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_33"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_station_head_big"
|
||||
android:src="@drawable/bus_switch_line_adapter_point"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_station_head"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_station_head"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_station_head"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_station_head"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_station_name"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_station_head"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_write_off_count"
|
||||
android:text="天安门天安门天安门…"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:ellipsize="end"
|
||||
android:textSize="@dimen/dp_45"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_write_off_count"
|
||||
android:text="核销66人"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -12,10 +12,10 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:layout_marginEnd="@dimen/dp_42"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_width="@dimen/dp_856"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
<com.mogo.och.weaknet.ui.loading.LoadingViewBig
|
||||
<com.mogo.och.weaknet.view.LoadingViewBig
|
||||
android:id="@+id/loading_biz"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@@ -45,5 +45,14 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.och.weaknet.ui.taskrunning.TaskRunningView
|
||||
android:id="@+id/taskRunning"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_23"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -71,7 +71,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<com.mogo.och.weaknet.ui.loading.LoadingViewSmall
|
||||
<com.mogo.och.weaknet.view.LoadingViewSmall
|
||||
android:id="@+id/loading_start_line"
|
||||
android:src="@drawable/bus_switch_biz_loading_samll"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ll_loaing_view"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_task_leave_station_slide_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@drawable/bus_task_leave_station_slide_bg"
|
||||
android:layout_width="@dimen/dp_774"
|
||||
android:layout_height="@dimen/dp_120"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_draggable"
|
||||
android:text="@string/bus_task_leave_station"
|
||||
android:textColor="@color/white"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bus_task_leave_station_slede"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_task_leave_station_slide_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_task_leave_station_slide_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_task_leave_station_slide_bg"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:layout_width="@dimen/dp_300"
|
||||
android:layout_height="@dimen/dp_120"/>
|
||||
</merge>
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_880"
|
||||
android:layout_height="@dimen/dp_966"
|
||||
tools:background="@drawable/bus_switch_line_normal"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bus_task_running_line_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/dp_45"
|
||||
android:layout_marginLeft="@dimen/dp_54"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_37"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/bus_switch_line_title"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_running_task_last_station"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_36"
|
||||
app:layout_constraintStart_toStartOf="@+id/bus_task_running_line_name"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bus_task_running_line_name"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
tools:text="往新街口方向"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_running_task_time"
|
||||
android:textColor="@color/white"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:layout_marginEnd="@dimen/dp_54"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:text="往新街口方向"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_100"/>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rl_running_task_station_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
android:layout_marginStart="@dimen/dp_54"
|
||||
android:layout_marginEnd="@dimen/bus_dp_52"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_running_task_last_station"
|
||||
app:layout_constraintBottom_toTopOf="@+id/aciv_task_leave_station_slide_bg"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:layout_marginBottom="@dimen/dp_46"/>
|
||||
|
||||
<com.mogo.och.weaknet.view.BizLeaveStationView
|
||||
android:id="@+id/aciv_task_leave_station_slide_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_46"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -53,6 +53,8 @@
|
||||
<color name="bus_color_80000000">#80000000</color>
|
||||
<color name="bus_color_B3FFFFFF">#B3FFFFFF</color>
|
||||
<color name="bus_color_4DFFFFFF">#4D2EACFF</color>
|
||||
<color name="bus_color_19E6D4">#19E6D4</color>
|
||||
<color name="bus_color_198BF6">#198BF6</color>
|
||||
<color name="bus_color_66666">#666666</color>
|
||||
|
||||
<color name="bus_color_ccb9c3e9">#CCB9C3E9</color>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<string name="bus_line_goto_end">往%1$s方向</string>
|
||||
<string name="bus_change_line_commit_tip_s">更换任务成功</string>
|
||||
<string name="bus_change_line_commit_tip_f">更换任务失败</string>
|
||||
<string name="bus_task_leave_station">滑动出发</string>
|
||||
<string name="bus_arrive_to_end_start">起点:</string>
|
||||
<string name="bus_arrive_to_end_end">终点:</string>
|
||||
<string name="bus_arrive_to_current_tag">当前站点:</string>
|
||||
|
||||
Reference in New Issue
Block a user