[8.2.0]
[算路] [对线路进行排序]
This commit is contained in:
@@ -25,7 +25,18 @@ import com.mogo.och.common.module.wigets.WrapContentLinearLayoutManager
|
||||
import com.mogo.och.biz.routing.ui.RoutingSwitchModel
|
||||
import com.mogo.och.biz.routing.ui.routingselect.RoutingSelectModel.SwtichRoutingViewCallback
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.aciv_refresh_task
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_current_order
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_distance
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_id_asc
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_id_desc
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_num_asc
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_num_desc
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_time_asc
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.actv_order_by_time_desc
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.cl_select_order
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.cl_select_order_contain
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.include_empty
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.include_error
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.switch_routing_rv
|
||||
@@ -122,6 +133,67 @@ class RoutingSelectView: ConstraintLayout, SwtichRoutingViewCallback {
|
||||
}
|
||||
animator?.start()
|
||||
}
|
||||
|
||||
cl_select_order_contain.onClick {
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
}
|
||||
cl_select_order.onClick {
|
||||
cl_select_order_contain.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
actv_order_by_distance.onClick {
|
||||
mRoutingLineList.sortBy { it.distance }
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_default)
|
||||
switch_routing_rv.smoothScrollToPosition(0)
|
||||
}
|
||||
actv_order_by_id_asc.onClick {
|
||||
mRoutingLineList.sortBy { it.lineId }
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_id_asc)
|
||||
switch_routing_rv.smoothScrollToPosition(0)
|
||||
}
|
||||
actv_order_by_id_desc.onClick {
|
||||
mRoutingLineList.sortByDescending { it.lineId }
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_id_desc)
|
||||
switch_routing_rv.smoothScrollToPosition(0)
|
||||
}
|
||||
actv_order_by_num_asc.onClick {
|
||||
mRoutingLineList.sortBy {
|
||||
(it.lineSuccessCount?:0)+(it.lineFailCount?:0)
|
||||
}
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_num_asc)
|
||||
switch_routing_rv.smoothScrollToPosition(0)
|
||||
}
|
||||
actv_order_by_num_desc.onClick {
|
||||
mRoutingLineList.sortByDescending {
|
||||
(it.lineSuccessCount?:0)+(it.lineFailCount?:0)
|
||||
}
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_num_desc)
|
||||
switch_routing_rv.smoothScrollToPosition(0)
|
||||
}
|
||||
actv_order_by_time_asc.onClick {
|
||||
mRoutingLineList.sortBy { it.contrailId }
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_time_asc)
|
||||
switch_routing_rv.smoothScrollToPosition(0)
|
||||
}
|
||||
actv_order_by_time_desc.onClick {
|
||||
mRoutingLineList.sortByDescending { it.contrailId }
|
||||
mChooseLineListAdapter.notifyDataSetChanged()
|
||||
cl_select_order_contain.visibility = View.GONE
|
||||
actv_current_order.text = ResourcesUtils.getString(R.string.biz_routing_order_time_desc)
|
||||
switch_routing_rv.smoothScrollToPosition(0)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showEmptyView() {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 487 B |
@@ -30,6 +30,35 @@
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_50"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_select_order"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_search_order"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_48"
|
||||
android:layout_marginEnd="@dimen/dp_63"
|
||||
android:src="@drawable/biz_routing_search_icon"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_19"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_current_order"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_search_order"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_search_order"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_search_order"
|
||||
android:text="@string/biz_routing_order_default"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/switch_routing_rv"
|
||||
android:layout_width="match_parent"
|
||||
@@ -48,6 +77,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
@@ -59,7 +89,120 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_select_order_contain"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_select_order_info"
|
||||
android:src="@drawable/biz_routing_order_bg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="-19dp"
|
||||
android:layout_marginEnd="-29dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="@dimen/dp_458"
|
||||
android:layout_height="@dimen/dp_672"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_by_distance"
|
||||
android:layout_marginTop="@dimen/dp_19"
|
||||
app:layout_constraintTop_toTopOf="@+id/aciv_select_order_info"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_order_by_id_asc"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_select_order_info"
|
||||
android:layout_marginEnd="@dimen/dp_109"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:text="@string/biz_routing_order_default"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_search_order_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/actv_order_by_distance"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/actv_order_by_distance"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_order_by_distance"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/biz_routing_search_icon"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_19"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_by_id_asc"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_order_by_id_desc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_by_distance"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_order_by_distance"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:text="@string/biz_routing_order_id_asc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_by_id_desc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_by_id_asc"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_order_by_num_asc"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_order_by_distance"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:text="@string/biz_routing_order_id_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_by_num_asc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_by_id_desc"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_order_by_num_desc"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_order_by_distance"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:text="@string/biz_routing_order_num_asc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_by_num_desc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_by_num_asc"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_order_by_time_asc"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_order_by_distance"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:text="@string/biz_routing_order_num_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_by_time_asc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_by_num_desc"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actv_order_by_time_desc"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_order_by_distance"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:text="@string/biz_routing_order_time_asc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_by_time_desc"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_by_time_asc"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/aciv_select_order_info"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_order_by_distance"
|
||||
android:textColor="@color/common_ffffffff"
|
||||
android:textSize="@dimen/dp_38"
|
||||
android:layout_marginBottom="@dimen/dp_19"
|
||||
android:text="@string/biz_routing_order_time_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</merge>
|
||||
@@ -1,4 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="biz_bus_dialog_tips">您确认要结束任务吗?</string>
|
||||
<string name="biz_routing_order_default">距离最近</string>
|
||||
<string name="biz_routing_order_id_asc">线路ID升序</string>
|
||||
<string name="biz_routing_order_id_desc">线路ID降序</string>
|
||||
<string name="biz_routing_order_num_asc">验证次数升序</string>
|
||||
<string name="biz_routing_order_num_desc">验证次数降序</string>
|
||||
<string name="biz_routing_order_time_asc">灰度时间升序</string>
|
||||
<string name="biz_routing_order_time_desc">灰度时间降序</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user