Commit c40666c1 by 刘鹏

feat : 信息收集卡type7终止图文加入完成

parent d61e9bb2
......@@ -86,6 +86,8 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
private var location: Int = 0
private var ffrom2: String? = null
/**单选类型*/
private const val RADIO_KEY="radio"
@JvmStatic
fun start(context: Context, toUid: String, expertInfo: IMExpertBuild, isFromQingShu: Int) {
......@@ -203,7 +205,10 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
/**添加view事件*/
private fun addVIewListener() {
left_back_btn.setOnClickListener { finish() }
left_back_btn.setOnClickListener {
ActionCountUtils.count("daoyi_consult_assess_page|return_click")
finish()
}
tv_skip.setOnClickListener {
if (Utils.isFastClick()) {
//防止连击
......@@ -399,8 +404,13 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
if (questionsBean != null) {
//还有下一题
questionMultiItem2.questionsBean = questionsBean
if ("radio" == questionsBean.type) {
questionMultiItem2.viewType = 3
if (RADIO_KEY == questionsBean.type) {
if(!questionsBean.image.isNullOrEmpty()||!questionsBean.url.isNullOrEmpty()){
tv_skip.visibility = View.GONE
questionMultiItem2.viewType = 7
}else{
questionMultiItem2.viewType = 3
}
} else {
questionMultiItem2.viewType = 4
questionMultiItem2.type4CanClick = true
......
......@@ -7,6 +7,7 @@ import android.text.TextUtils;
import android.text.style.ForegroundColorSpan;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.core.content.ContextCompat;
......@@ -16,7 +17,10 @@ import androidx.recyclerview.widget.RecyclerView;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ydl.webview.H5Params;
import com.ydl.webview.NewH5Activity;
import com.ydl.ydl_image.module.GlideApp;
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils;
import com.yidianling.avchatkit.AVChatKit;
import com.yidianling.im.R;
import com.yidianling.im.helper.SpanUtils;
......@@ -50,6 +54,10 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
addItemType(5, R.layout.item_left_describe_layout);
//主诉----单选
addItemType(6, R.layout.item_left_one_check_layout);
//主诉----单选
addItemType(6, R.layout.item_left_one_check_layout);
//中断 图文
addItemType(7, R.layout.item_left_img_url_layout);
}
......@@ -91,6 +99,31 @@ public class QuestionAdapter extends BaseMultiItemQuickAdapter<QuestionMultiItem
break;
case 6:
convertType6(helper, item);
case 7:
helper.setText(R.id.multiple_type7_title, item.questionsBean.name);
ImageView image = helper.getView(R.id.image);
LinearLayout jumpUrlView = helper.getView(R.id.jump_url);
if (item.questionsBean.image != null) {
GlideApp.with(mContext)
.load(item.questionsBean.image)
.dontAnimate()
.into(image);
}
if (item.questionsBean.url != null) {
helper.setVisible(R.id.jump_url,true);
jumpUrlView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ActionCountUtils.Companion.count("daoyi_consult_assess_page|leave_click");
NewH5Activity.start(mContext,new H5Params(item.questionsBean.url, ""));
}
});
} else {
helper.setVisible(R.id.jump_url,false);
}
break;
default:
break;
......
......@@ -15,7 +15,7 @@ public class QuestionMultiItem implements MultiItemEntity {
public String type1Text;
public String type2Text;
public String type2Other;
/***type 3 单选 type 4 多选 type 6 */
/***type 3 单选 type 4 多选 type 6 终止选项 type 7 */
public QuestionsBean questionsBean;
public boolean type3CanClick = true;
public boolean type4CanClick = true;
......
......@@ -30,6 +30,10 @@ public class QuestionsBean implements Serializable {
public String category;
public String order;
public String name;
/**结束流程图片*/
public String image;
/**结束流程跳转地址*/
public String url;
/***类型:
* radio(单选)
* /check(复选)
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/platform_color_1DA1F2" />
<corners android:radius="18dp" />
</shape>
\ No newline at end of file
<?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:padding="12dp">
<ImageView
android:id="@+id/iv_header"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintRight_toLeftOf="@id/iv_right"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:orientation="vertical"
android:padding="12dp">
<TextView
android:id="@+id/multiple_type7_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生" />
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp" />
<LinearLayout
android:id="@+id/jump_url"
android:layout_width="match_parent"
android:layout_height="32dp"
android:background="@drawable/bg_shape_1da1f2_r18"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="点击前往"
android:textColor="@color/white"
android:textSize="14sp" />
<ImageView
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_marginLeft="4dp"
android:src="@drawable/ic_arrow_right" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/iv_right"
android:layout_width="36dp"
android:layout_height="36dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment