[2.13.0]消息盒子
This commit is contained in:
@@ -311,7 +311,13 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
if(isChecked){
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.GONE
|
||||
}else{
|
||||
viewPassengerMsgBoxList.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
|
||||
@@ -31,6 +31,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
|
||||
|
||||
private val TAG = "PassengerMsgBoxBubbleView"
|
||||
private val dataList :ArrayList<MsgBoxBean> = ArrayList()
|
||||
var passengerMsgBoxBubbleAdapter: PassengerMsgBoxBubbleAdapter ?= null
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_passenger_msg_box_bubble, this, true)
|
||||
@@ -42,7 +43,7 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
linearLayoutManager.stackFromEnd = true
|
||||
linearLayoutManager.reverseLayout = true
|
||||
passengerMsgBoxBubbleAdapter = PassengerMsgBoxBubbleAdapter()
|
||||
passengerMsgBoxBubbleAdapter = PassengerMsgBoxBubbleAdapter(context as Activity)
|
||||
rvPassengerBubbleList.adapter = passengerMsgBoxBubbleAdapter
|
||||
rvPassengerBubbleList.layoutManager = linearLayoutManager
|
||||
|
||||
@@ -50,7 +51,13 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
dataList.add(msgBoxList)
|
||||
passengerMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fun setData(){
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxListAdapter
|
||||
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
|
||||
import kotlinx.android.synthetic.main.layout_passenger_msg_box_list.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 乘客端消息盒子列表视图
|
||||
* @since: 2022/11/29
|
||||
*/
|
||||
class PassengerMsgBoxListView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr){
|
||||
|
||||
var passengerMsgBoxListAdapter: PassengerMsgBoxListAdapter ?= null
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_passenger_msg_box_list, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
val linearLayoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
val divider = DividerItemDecoration(context, linearLayoutManager.orientation)
|
||||
getDrawable(R.drawable.rv_divider_line)?.let { divider.setDrawable(it) }
|
||||
passengerMsgBoxListAdapter = PassengerMsgBoxListAdapter(context as Activity)
|
||||
rvPassengerList.adapter = passengerMsgBoxListAdapter
|
||||
rvPassengerList.layoutManager = linearLayoutManager
|
||||
rvPassengerList.addItemDecoration(divider)
|
||||
//获取通知消息列表
|
||||
val noticeList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedNotifyData()
|
||||
noticeList?.let {
|
||||
passengerMsgBoxListAdapter?.setData(it.reversed())
|
||||
}
|
||||
|
||||
// setData()
|
||||
}
|
||||
|
||||
fun setData(){
|
||||
val list :ArrayList<MsgBoxBean> = ArrayList()
|
||||
val one = MsgBoxBean(MsgBoxType.V2X, V2XMsg("","ceshiyixa"))
|
||||
val two = MsgBoxBean(MsgBoxType.OPERATION, V2XMsg("","ceshiyixa1"))
|
||||
val three = MsgBoxBean(MsgBoxType.OPERATION, V2XMsg("","ceshiyixa2"))
|
||||
list.add(one)
|
||||
list.add(two)
|
||||
list.add(three)
|
||||
passengerMsgBoxListAdapter?.setData(list)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.CountDownTimer
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -7,11 +8,16 @@ import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
|
||||
@@ -20,40 +26,57 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
* @description 乘客端消息盒子气泡视图RecyclerView适配器
|
||||
* @since: 2022/11/25
|
||||
*/
|
||||
class PassengerMsgBoxBubbleAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: ArrayList<MsgBoxBean> ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
|
||||
fun setData(data: ArrayList<MsgBoxBean>){
|
||||
this.data = data
|
||||
if(data.size>3){
|
||||
data.removeAt(0)
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}else{
|
||||
if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleOperationHolder){
|
||||
if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvPassengerOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerOperationContent.text = operationMsg.content
|
||||
val noticeNormalData = it[position].bean as NoticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData.content
|
||||
GlideApp.with(activity).load(noticeNormalData.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
|
||||
val v2XMsg = it[position].bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
val msgBoxBean: MsgBoxBean = data!![position]
|
||||
@@ -76,27 +99,27 @@ class PassengerMsgBoxBubbleAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.OPERATION){
|
||||
return operation
|
||||
}else{
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
}
|
||||
}
|
||||
|
||||
//官方公告
|
||||
class BubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivPassengerOperationImage: ImageView = itemView.findViewById(R.id.ivPassengerOperationImage)
|
||||
var tvPassengerOperationTitle: TextView = itemView.findViewById(R.id.tvPassengerOperationTitle)
|
||||
var tvPassengerOperationContent: TextView = itemView.findViewById(R.id.tvPassengerOperationContent)
|
||||
var tvPassengerOperationCheck: TextView = itemView.findViewById(R.id.tvPassengerOperationCheck)
|
||||
var tvPassengerOperationTime: TextView = itemView.findViewById(R.id.tvPassengerOperationTime)
|
||||
}
|
||||
|
||||
//Notice
|
||||
class BubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivPassengerNoticeImage: ImageView = itemView.findViewById(R.id.ivPassengerNoticeImage)
|
||||
var ivPassengerNoticeTime: TextView = itemView.findViewById(R.id.ivPassengerNoticeTime)
|
||||
var ivPassengerNoticeContent: TextView = itemView.findViewById(R.id.ivPassengerNoticeContent)
|
||||
var tvPassengerNoticeTitle: TextView = itemView.findViewById(R.id.tvPassengerNoticeTitle)
|
||||
var tvPassengerNoticeContent: TextView = itemView.findViewById(R.id.tvPassengerNoticeContent)
|
||||
var tvPassengerNoticeCheck: TextView = itemView.findViewById(R.id.tvPassengerNoticeCheck)
|
||||
var tvPassengerNoticeTime: TextView = itemView.findViewById(R.id.tvPassengerNoticeTime)
|
||||
}
|
||||
|
||||
//OBU、V2X
|
||||
class BubbleV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivPassengerV2XImage: ImageView = itemView.findViewById(R.id.ivPassengerV2XImage)
|
||||
var tvPassengerV2XTime: TextView = itemView.findViewById(R.id.tvPassengerV2XTime)
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
|
||||
|
||||
import android.app.Activity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 乘客端消息盒子列表视图RecyclerView适配器
|
||||
* @since: 2022/11/29
|
||||
*/
|
||||
class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.Adapter<RecyclerView.ViewHolder>(){
|
||||
|
||||
private var data: List<MsgBoxBean> ?= null
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
|
||||
fun setData(data: List<MsgBoxBean>){
|
||||
this.data = data
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_notice,parent,false)
|
||||
ListNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_v2x,parent,false)
|
||||
ListV2XHolder(view)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is ListNoticeHolder){
|
||||
data?.let {
|
||||
val noticeNormalData = it[position].bean as NoticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData.content
|
||||
GlideApp.with(activity).load(noticeNormalData.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
}
|
||||
}else if(holder is ListV2XHolder){
|
||||
data?.let {
|
||||
val v2XMsg = it[position].bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
}
|
||||
}
|
||||
|
||||
//Notice
|
||||
class ListNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivPassengerNoticeImage: ImageView = itemView.findViewById(R.id.ivPassengerNoticeImage)
|
||||
var tvPassengerNoticeTitle: TextView = itemView.findViewById(R.id.tvPassengerNoticeTitle)
|
||||
var tvPassengerNoticeContent: TextView = itemView.findViewById(R.id.tvPassengerNoticeContent)
|
||||
var tvPassengerNoticeCheck: TextView = itemView.findViewById(R.id.tvPassengerNoticeCheck)
|
||||
var tvPassengerNoticeTime: TextView = itemView.findViewById(R.id.tvPassengerNoticeTime)
|
||||
}
|
||||
|
||||
//OBU、V2X
|
||||
class ListV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivPassengerV2XImage: ImageView = itemView.findViewById(R.id.ivPassengerV2XImage)
|
||||
var tvPassengerV2XTime: TextView = itemView.findViewById(R.id.tvPassengerV2XTime)
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#5074B3"/>
|
||||
<size android:height="1dp" />
|
||||
|
||||
</shape>
|
||||
@@ -201,7 +201,7 @@
|
||||
android:layout_height="150dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="220dp"
|
||||
android:layout_marginStart="300dp"
|
||||
android:layout_marginBottom="30px"
|
||||
android:button="@null"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
@@ -243,10 +243,19 @@
|
||||
android:id="@+id/viewPassengerMsgBoxBubble"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxListView
|
||||
android:id="@+id/viewPassengerMsgBoxList"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="750px"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
|
||||
@@ -4,43 +4,81 @@
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px">
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginBottom="10px"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerNoticeImage"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
android:layout_width="160px"
|
||||
android:layout_height="160px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="20px"
|
||||
android:src="@drawable/icon_passenger_operation"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ivPassengerNoticeTime"
|
||||
android:id="@+id/tvPassengerNoticeTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:layout_marginEnd="20px"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="20px"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerNoticeContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ivPassengerNoticeContent"
|
||||
android:id="@+id/tvPassengerNoticeContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/ivPassengerNoticeTime"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerNoticeTime"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerNoticeCheck"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="160px"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="80px"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerNoticeTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:textSize="26px"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
android:layout_marginEnd="20px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerV2XImage"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="20px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerV2XTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:layout_marginEnd="20px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerV2XContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerV2XImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerV2XTime"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,18 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginBottom="10px"
|
||||
>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerOperationImage"
|
||||
android:layout_width="160px"
|
||||
android:layout_height="160px"
|
||||
android:id="@+id/ivPassengerNoticeImage"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -20,37 +15,37 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationTitle"
|
||||
android:id="@+id/tvPassengerNoticeTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="20px"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerOperationImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerOperationContent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerNoticeContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationContent"
|
||||
android:id="@+id/tvPassengerNoticeContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerOperationTime"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerNoticeTime"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationCheck"
|
||||
android:id="@+id/tvPassengerNoticeCheck"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="160px"
|
||||
android:layout_height="150px"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28px"
|
||||
@@ -66,19 +61,19 @@
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerOperationCheck"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationTime"
|
||||
android:id="@+id/tvPassengerNoticeTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerOperationCheck"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerNoticeCheck"
|
||||
android:layout_marginEnd="20px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerV2XImage"
|
||||
android:layout_width="96px"
|
||||
android:layout_height="96px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerV2XTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerV2XContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerV2XImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerV2XTime"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="750px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#31486E"
|
||||
app:roundLayoutRadius="40px">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvPassengerList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginStart="20px"
|
||||
android:layout_marginEnd="20px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
Reference in New Issue
Block a user