[UI] 交警类型弹窗
This commit is contained in:
@@ -217,6 +217,9 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
|||||||
override fun showNoticeForTrafficWithData(trafficStylePushData: NoticeTrafficStylePushData) {
|
override fun showNoticeForTrafficWithData(trafficStylePushData: NoticeTrafficStylePushData) {
|
||||||
activity.let {
|
activity.let {
|
||||||
val noticeBannerView = this.getContext()?.let { it1 -> NoticeBannerView(it1) }
|
val noticeBannerView = this.getContext()?.let { it1 -> NoticeBannerView(it1) }
|
||||||
|
if (noticeBannerView != null) {
|
||||||
|
noticeBannerView.refreshWithData(trafficStylePushData)
|
||||||
|
}
|
||||||
mWarningFloat = it?.let { it1 ->
|
mWarningFloat = it?.let { it1 ->
|
||||||
noticeBannerView?.let { it2 ->
|
noticeBannerView?.let { it2 ->
|
||||||
WarningFloat.with(it1)
|
WarningFloat.with(it1)
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
|
||||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
||||||
|
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
|
||||||
import com.mogo.eagle.core.function.hmi.R;
|
import com.mogo.eagle.core.function.hmi.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,6 +48,10 @@ public class NoticeBannerView extends ConstraintLayout {
|
|||||||
super(context, attrs, defStyleAttr, defStyleRes);
|
super(context, attrs, defStyleAttr, defStyleRes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void refreshWithData(NoticeTrafficStylePushData pushData){
|
||||||
|
noticePushTitle.setText(pushData.getMsg());
|
||||||
|
noticePushContent.setText(pushData.getContent());
|
||||||
|
}
|
||||||
public void initView() {
|
public void initView() {
|
||||||
styleImageView = findViewById(R.id.notice_push_style_image);
|
styleImageView = findViewById(R.id.notice_push_style_image);
|
||||||
iconImageView = findViewById(R.id.notice_push_icon_video);
|
iconImageView = findViewById(R.id.notice_push_icon_video);
|
||||||
@@ -55,8 +60,8 @@ public class NoticeBannerView extends ConstraintLayout {
|
|||||||
noticeBannerCheck = findViewById(R.id.notice_push_banner_check);
|
noticeBannerCheck = findViewById(R.id.notice_push_banner_check);
|
||||||
|
|
||||||
noticeBannerCheck.setOnClickListener(v -> {
|
noticeBannerCheck.setOnClickListener(v -> {
|
||||||
mNoticeTrafficDialog = new NoticeTrafficDialog(mContext);
|
// mNoticeTrafficDialog = new NoticeTrafficDialog(mContext);
|
||||||
mNoticeTrafficDialog.show();
|
// mNoticeTrafficDialog.show();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
android:layout_marginLeft="@dimen/dp_18"
|
android:layout_marginLeft="@dimen/dp_18"
|
||||||
android:layout_marginBottom="@dimen/dp_18"
|
android:layout_marginBottom="@dimen/dp_18"
|
||||||
android:src="@drawable/notice_banner_icon_video"
|
android:src="@drawable/notice_banner_icon_video"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/notice_push_image"
|
app:layout_constraintBottom_toBottomOf="@+id/notice_push_style_image"
|
||||||
app:layout_constraintLeft_toLeftOf="@+id/notice_push_image" />
|
app:layout_constraintLeft_toLeftOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/module_push_app_icon_title"
|
android:id="@+id/module_push_app_icon_title"
|
||||||
@@ -46,12 +46,11 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center_vertical|left"
|
android:gravity="center_vertical|left"
|
||||||
android:maxWidth="@dimen/dp_184"
|
|
||||||
android:maxLength="25"
|
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="@dimen/dp_46"
|
android:textSize="@dimen/dp_46"
|
||||||
app:layout_constrainedWidth="true"
|
app:layout_constrainedWidth="true"
|
||||||
|
android:textStyle="bold"
|
||||||
tools:text="官方公告" />
|
tools:text="官方公告" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<dimen name="dp_38">38px</dimen>
|
<dimen name="dp_38">38px</dimen>
|
||||||
<dimen name="dp_42">42px</dimen>
|
<dimen name="dp_42">42px</dimen>
|
||||||
<dimen name="dp_45">45px</dimen>
|
<dimen name="dp_45">45px</dimen>
|
||||||
|
<dimen name="dp_46">46px</dimen>
|
||||||
<dimen name="dp_50">50px</dimen>
|
<dimen name="dp_50">50px</dimen>
|
||||||
<dimen name="dp_52">52px</dimen>
|
<dimen name="dp_52">52px</dimen>
|
||||||
<dimen name="dp_54">54px</dimen>
|
<dimen name="dp_54">54px</dimen>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<dimen name="dp_38">38px</dimen>
|
<dimen name="dp_38">38px</dimen>
|
||||||
<dimen name="dp_42">42px</dimen>
|
<dimen name="dp_42">42px</dimen>
|
||||||
<dimen name="dp_45">45px</dimen>
|
<dimen name="dp_45">45px</dimen>
|
||||||
|
<dimen name="dp_46">46px</dimen>
|
||||||
<dimen name="dp_50">50px</dimen>
|
<dimen name="dp_50">50px</dimen>
|
||||||
<dimen name="dp_52">52px</dimen>
|
<dimen name="dp_52">52px</dimen>
|
||||||
<dimen name="dp_54">54px</dimen>
|
<dimen name="dp_54">54px</dimen>
|
||||||
|
|||||||
Reference in New Issue
Block a user