rebase
This commit is contained in:
@@ -373,4 +373,8 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
}
|
||||
override fun vipIdentification(visible: Boolean) {
|
||||
flVipIdentificationView.visibility = if (visible) View.VISIBLE else View.GONE
|
||||
}
|
||||
|
||||
}
|
||||
@@ -133,5 +133,10 @@ interface MoGoWarningContract {
|
||||
* @param normalData
|
||||
*/
|
||||
fun showNoticeNormal(normalData: NoticeNormalData)
|
||||
|
||||
/**
|
||||
* 展示VIP标识
|
||||
*/
|
||||
fun vipIdentification(visible: Boolean)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.utils.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_vip_identification.view.*
|
||||
|
||||
/**
|
||||
* VIP标识控件
|
||||
*/
|
||||
class VipIdentificationView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_vip_identification, this, true)
|
||||
}
|
||||
|
||||
fun setVipIdentificationVisible(visible: Boolean) {
|
||||
UiThreadHandler.post {
|
||||
ivVipIdentification.visibility = visibility
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -120,6 +120,10 @@ class MoGoWarningProvider : IMoGoWaringProvider {
|
||||
}
|
||||
}
|
||||
|
||||
override fun vipIdentification(visible: Boolean) {
|
||||
mMoGoHmiFragment?.vipIdentification(visible)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
Log.d(TAG, "onDestroy")
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
@@ -24,6 +24,14 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:id="@+id/flVipIdentificationView"
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:layout_marginLeft="@dimen/module_vip_margin_left"
|
||||
app:layout_constraintLeft_toRightOf="@+id/flSpeedChartView"
|
||||
app:layout_constraintTop_toTopOf="@+id/flSpeedChartView" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.AutoPilotStatusView
|
||||
android:id="@+id/viewAutopilotStatus"
|
||||
android:layout_width="@dimen/module_mogo_autopilot_status_bg_width"
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?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:id="@+id/clVipIdentification"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivVipIdentification"
|
||||
android:layout_width="@dimen/dp_104"
|
||||
android:layout_height="@dimen/dp_104"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/v2x_vip_identification_vr"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user