2.2.9发布
parent
3cd712eafe
commit
4895991f74
@ -0,0 +1,37 @@
|
||||
package com.rehome.zhdcoa.adapter;
|
||||
|
||||
|
||||
import static android.text.Html.FROM_HTML_MODE_LEGACY;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.Html;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.rehome.zhdcoa.R;
|
||||
import com.rehome.zhdcoa.bean.WorkRiskLevelTipListBean;
|
||||
import java.util.List;
|
||||
|
||||
public class WorkRiskListTipAdapter extends CommonAdapter<WorkRiskLevelTipListBean> {
|
||||
|
||||
private final Context context;
|
||||
private List<WorkRiskLevelTipListBean> datas;
|
||||
|
||||
public WorkRiskListTipAdapter(Context context, List<WorkRiskLevelTipListBean> datas) {
|
||||
super(context, R.layout.adapter_item_work_risk_list_tip, datas);
|
||||
this.context = context;
|
||||
this.datas = datas;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(ViewHolder viewHolder, WorkRiskLevelTipListBean item, int position) {
|
||||
if (item != null) {
|
||||
viewHolder.setText(R.id.tv_xh, String.valueOf(position+1));
|
||||
viewHolder.setText(R.id.tv_weiHai, item.getType());
|
||||
viewHolder.setText(R.id.tv_yuFang, item.getPrecaution());
|
||||
|
||||
// String tv_precaution = "<u> color='#999999'>" + item.getPrecaution() +"</u>";
|
||||
// TextView tv =viewHolder.getView(R.id.tv_yuFang);
|
||||
// tv.setText(Html.fromHtml(tv_precaution));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.rehome.zhdcoa.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HazardListBean {
|
||||
private String type;
|
||||
|
||||
private List<String> precautionList;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<String> getPrecautionList() {
|
||||
return precautionList;
|
||||
}
|
||||
|
||||
public void setPrecautionList(List<String> precautionList) {
|
||||
this.precautionList = precautionList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.rehome.zhdcoa.bean;
|
||||
|
||||
public class WorkRiskLevelTipListBean {
|
||||
private String type;
|
||||
private String precaution;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getPrecaution() {
|
||||
return precaution;
|
||||
}
|
||||
|
||||
public void setPrecaution(String precaution) {
|
||||
this.precaution = precaution;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.WorkRiskListTipActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbarView"
|
||||
layout="@layout/layout_base" />
|
||||
|
||||
<include
|
||||
android:id="@+id/item_head"
|
||||
layout="@layout/item_work_risk_list_tip"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginStart="10px"
|
||||
android:layout_marginEnd="10px"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_height="wrap_content" />
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10px"
|
||||
android:layout_marginEnd="10px"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<ListView
|
||||
android:id="@+id/lv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#00000000"
|
||||
android:dividerHeight="0px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nodata"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="@color/viewfinder_mask"
|
||||
android:gravity="center"
|
||||
android:text="暂无数据"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:minHeight="62px"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="60px">
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_xh"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="序号" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weiHai"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center"
|
||||
android:text="危害后果" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_yuFang"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center|start"
|
||||
android:layout_marginLeft="10px"
|
||||
android:layout_marginEnd="10px"
|
||||
android:layout_weight="2.4"
|
||||
android:text="预防措施" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#524658" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,81 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:minHeight="62px"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id="@+id/head"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#524658"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="60px">
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_xh"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="序号" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_paiHao"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center"
|
||||
android:text="危害后果" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qymc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="10px"
|
||||
android:layout_marginEnd="10px"
|
||||
android:layout_weight="2.4"
|
||||
android:text="预防措施" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#524658" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#524658" />
|
||||
|
||||
</LinearLayout>
|
||||
Loading…
Reference in New Issue