Merge branch 'gh' into dev_MogoAP_eagle-1030_211020_8.0.14
This commit is contained in:
@@ -60,8 +60,8 @@ public class NoticeBannerView extends ConstraintLayout {
|
||||
noticeBannerCheck = findViewById(R.id.notice_push_banner_check);
|
||||
|
||||
noticeBannerCheck.setOnClickListener(v -> {
|
||||
// mNoticeTrafficDialog = new NoticeTrafficDialog(mContext);
|
||||
// mNoticeTrafficDialog.show();
|
||||
mNoticeTrafficDialog = new NoticeTrafficDialog(mContext);
|
||||
mNoticeTrafficDialog.show();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,11 @@ class NoticeTrafficAdapter extends RecyclerView.Adapter {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
NoticeValue value = data.get(position);
|
||||
((TrafficInfoHolder) holder).keyText.setText(value.getKey());
|
||||
((TrafficInfoHolder) holder).valueText.setText(value.getValue());
|
||||
if (data.size() > position) {
|
||||
NoticeValue value = data.get(position);
|
||||
((TrafficInfoHolder) holder).keyText.setText(value.getKey());
|
||||
((TrafficInfoHolder) holder).valueText.setText(value.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
*/
|
||||
public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
private Context mContext;
|
||||
private RecyclerView mRecyclerView;
|
||||
private NoticeTrafficInfoView mRecyclerView;
|
||||
|
||||
public NoticeTrafficDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
@@ -31,13 +31,14 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
}
|
||||
|
||||
public void initView() {
|
||||
mRecyclerView = findViewById(R.id.traffic_info_recyclerView);
|
||||
//网格布局
|
||||
GridLayoutManager layoutManager = new GridLayoutManager(mContext, 4);
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
layoutManager.setOrientation(GridLayoutManager.VERTICAL);
|
||||
setContentView(R.layout.notice_dialog_traffic_police);
|
||||
//网格绘制
|
||||
try {
|
||||
mRecyclerView = findViewById(R.id.traffic_info_recyclerView);
|
||||
//网格布局
|
||||
GridLayoutManager layoutManager = new GridLayoutManager(mContext, 4);
|
||||
mRecyclerView.setLayoutManager(layoutManager);
|
||||
layoutManager.setOrientation(GridLayoutManager.VERTICAL);
|
||||
NoticeTrafficInfoGridItemDivider gridLayoutDivider = new NoticeTrafficInfoGridItemDivider(1,
|
||||
(mContext.getResources().getColor(R.color.notice_dialog_back)));
|
||||
mRecyclerView.addItemDecoration(gridLayoutDivider);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/notice_traffic_dialog_title" />
|
||||
<!--事故来源等事故详情-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.mogo.eagle.core.function.hmi.ui.notice.NoticeTrafficInfoView
|
||||
android:id="@+id/traffic_info_recyclerView"
|
||||
android:layout_width="@dimen/notice_traffic_info_width"
|
||||
android:layout_height="@dimen/notice_traffic_info_height"
|
||||
|
||||
Reference in New Issue
Block a user