UI-自检列表第一行
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.mogo.eagle.core.function.check.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextPaint;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -50,10 +51,18 @@ public class CheckInfoAdapter extends RecyclerView.Adapter {
|
||||
if (position == 0 || position == 2) {
|
||||
((CheckInfoViewHolder) holder).checkIcon.setVisibility(View.GONE);
|
||||
((CheckInfoViewHolder) holder).mTextView.setText("模块名称");
|
||||
TextPaint tp = ((CheckInfoViewHolder) holder).mTextView.getPaint();
|
||||
tp.setFakeBoldText(true);
|
||||
((CheckInfoViewHolder) holder).backImage.setVisibility(View.VISIBLE);
|
||||
|
||||
} else if (position == 1 || position == 3) {
|
||||
((CheckInfoViewHolder) holder).checkIcon.setVisibility(View.GONE);
|
||||
((CheckInfoViewHolder) holder).mTextView.setText("运行状态");
|
||||
TextPaint tp = ((CheckInfoViewHolder) holder).mTextView.getPaint();
|
||||
tp.setFakeBoldText(true);
|
||||
((CheckInfoViewHolder) holder).backImage.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
((CheckInfoViewHolder) holder).backImage.setVisibility(View.INVISIBLE);
|
||||
try {
|
||||
if ((position - 4) < showData.size() * 2) {
|
||||
int index = (position - 4) / 2;
|
||||
@@ -99,11 +108,13 @@ public class CheckInfoAdapter extends RecyclerView.Adapter {
|
||||
public class CheckInfoViewHolder extends RecyclerView.ViewHolder {
|
||||
private ImageView checkIcon;
|
||||
private TextView mTextView;
|
||||
private View backImage;
|
||||
|
||||
public CheckInfoViewHolder(View v) {
|
||||
super(v);
|
||||
checkIcon = v.findViewById(R.id.info_check_icon);
|
||||
mTextView = v.findViewById(R.id.info_result_tx);
|
||||
backImage = v.findViewById(R.id.backImage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#767FCD"/>
|
||||
<stroke android:width="3px"/>
|
||||
<solid android:color="#151738"/>
|
||||
<stroke android:width="3px" android:color="#666DA5"/>
|
||||
</shape>
|
||||
@@ -3,16 +3,25 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="@dimen/dp_405"
|
||||
android:layout_height="@dimen/dp_127"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginLeft="@dimen/dp_34">
|
||||
android:layout_gravity="left">
|
||||
|
||||
<View
|
||||
android:id="@+id/backImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/check_driver"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_34"
|
||||
android:paddingLeft="@dimen/dp_46"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:paddingRight="@dimen/dp_25"
|
||||
android:gravity="left"
|
||||
android:paddingRight="@dimen/dp_25"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
Reference in New Issue
Block a user