[6.0.0]消息盒子M1乘客端增加空白站位图

This commit is contained in:
xuxinchao
2023-08-23 18:30:00 +08:00
committed by zhongchao
parent 1d2fa3de0d
commit 1bc5995a13
3 changed files with 21 additions and 0 deletions

View File

@@ -4,7 +4,9 @@ import android.app.Activity
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
@@ -55,6 +57,11 @@ class MMsgBoxListView @JvmOverloads constructor(
//获取通知消息列表
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
noticeList = noticeList?.let { ArrayList(it.reversed()) }
if(noticeList.isNullOrEmpty()){
ivMsgEmpty.visibility = View.VISIBLE
}else{
ivMsgEmpty.visibility = View.GONE
}
noticeList?.let {
mMsgBoxListAdapter?.setData(it)
}
@@ -68,6 +75,9 @@ class MMsgBoxListView @JvmOverloads constructor(
|| msgBoxList.type == MsgBoxType.OBU || msgBoxList.type == MsgBoxType.OPERATION){
noticeList?.add(0,msgBoxList)
noticeList?.let {
if(it.isNotEmpty() && ivMsgEmpty.isVisible){
ivMsgEmpty.visibility = View.GONE
}
mMsgBoxListAdapter?.setData(it)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -31,6 +31,17 @@
android:layout_marginEnd="@dimen/dp_18"
/>
<ImageView
android:id="@+id/ivMsgEmpty"
android:layout_width="267dp"
android:layout_height="165dp"
android:src="@drawable/icon_m_msg_empty"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
</com.mogo.eagle.core.widget.RoundConstraintLayout>
</LinearLayout>