parent
328e7b879a
commit
dffdd7ae8e
3 changed files with 64 additions and 2 deletions
@ -0,0 +1,25 @@ |
|||||||
|
package com.project.survey.ui.approval.adapter |
||||||
|
|
||||||
|
import android.content.Context |
||||||
|
import android.view.ViewGroup |
||||||
|
import com.chad.library.adapter4.BaseQuickAdapter |
||||||
|
import com.chad.library.adapter4.viewholder.QuickViewHolder |
||||||
|
import com.project.survey.R |
||||||
|
import com.project.survey.model.ApprovalBean |
||||||
|
|
||||||
|
class ApprovalWebAdapter : BaseQuickAdapter<ApprovalBean, QuickViewHolder>() { |
||||||
|
|
||||||
|
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: ApprovalBean?) { |
||||||
|
if (item == null) return |
||||||
|
holder.setText(R.id.tvTitle, item.title) |
||||||
|
.setText(R.id.tvContent, item.context) |
||||||
|
} |
||||||
|
|
||||||
|
override fun onCreateViewHolder( |
||||||
|
context: Context, |
||||||
|
parent: ViewGroup, |
||||||
|
viewType: Int |
||||||
|
): QuickViewHolder { |
||||||
|
return QuickViewHolder(R.layout.item_approval_web, parent) |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
<?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" |
||||||
|
xmlns:tools="http://schemas.android.com/tools" |
||||||
|
android:layout_width="match_parent" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_marginHorizontal="@dimen/sw_12dp" |
||||||
|
android:layout_marginVertical="@dimen/sw_5dp" |
||||||
|
android:background="@drawable/bg_white_round_4" |
||||||
|
android:paddingHorizontal="@dimen/sw_14dp" |
||||||
|
android:paddingTop="@dimen/sw_10dp" |
||||||
|
android:paddingBottom="@dimen/sw_12dp"> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvTitle" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:textColor="@color/text_color_20" |
||||||
|
android:textSize="@dimen/sw_13sp" |
||||||
|
android:textStyle="bold" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintTop_toTopOf="parent" |
||||||
|
tools:text="单位测量资质报验单" /> |
||||||
|
|
||||||
|
<TextView |
||||||
|
android:id="@+id/tvContent" |
||||||
|
android:layout_width="wrap_content" |
||||||
|
android:layout_height="wrap_content" |
||||||
|
android:layout_marginTop="@dimen/sw_6dp" |
||||||
|
android:textColor="@color/text_color_404145" |
||||||
|
android:textSize="@dimen/sw_12sp" |
||||||
|
app:layout_constraintStart_toStartOf="parent" |
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvTitle" |
||||||
|
tools:text="XMBH2021-00001" /> |
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout> |
Loading…
Reference in new issue