Commit 3617458a by 刘鹏

feat : UI优化

parent 78b46c65
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03",
"m-user" : "0.0.61.37",
"m-home" : "0.0.22.67",
"m-im" : "0.0.19.39",
"m-im" : "0.0.19.41",
"m-dynamic" : "0.0.7.24",
"m-article" : "0.0.0.10",
......
......@@ -191,14 +191,9 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
}
//发送回答问题信息
sendAnswerText(list, otherInput)
//回答问题参数创建
val answerQuestionRequestBean = answerQuestionRequestBean(question, list, "")
//灵犀消息 参数创建
addType70Request(answerQuestionRequestBean)
addType71Request(list[0].name, list[0].id)
makeType6(postion + 1)
}
})
......@@ -247,7 +242,15 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
if (noMore) {
//最后一题 点击发送
lastAnswer = et_input_problem.text.toString()
addType71Request(et_input_problem.text.toString())
if (mType71RequestList.size > 0) {
addType71Request(
et_input_problem.text.toString(),
mType71RequestList[0].data.cateId
)
} else {
addType71Request(et_input_problem.text.toString(), "")
}
tv_finish.visibility = View.VISIBLE
mackType2(lastAnswer)
setFirstAndLatQuestion("我们根据您的情况安排了一位高级咨询顾问,帮助您匹配最合适的咨询服务,点击按钮现在去沟通~")
......@@ -304,16 +307,9 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
if (char.contains("\n")) {
val s = char.toString().replace("\n", "")
if (TextUtils.isEmpty(s)) {
tv_send.visibility = LinearLayout.GONE
et_input_problem.setText("")
} else {
tv_send.visibility = LinearLayout.VISIBLE
}
} else {
tv_send.visibility = LinearLayout.VISIBLE
}
} else {
tv_send.visibility = LinearLayout.GONE
}
}
......@@ -537,12 +533,16 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
list.forEach {
answerStr = "$answerStr#${it.name} "
}
if ("#其他" == answerStr) {
answerStr = "其他"
} else {
if (otherInput.isNotEmpty()) {
answerStr = "$answerStr \n \n $otherInput"
}
if (!answerStr.contains("其他")) {
if (!answerStr.contains("其他")||otherInput.isEmpty()) {
answerStr = answerStr.substring(1).replace("#", "、")
}
}
mackType2(answerStr)
......@@ -683,16 +683,15 @@ class CmsExamQuestionPaperActivity : BaseActivity() {
/**
* 创建主诉消息参数
* */
private fun addType71Request(answer: String) {
private fun addType71Request(answer: String, optionId: String) {
val answerQuestionType71RequestBean = AnswerQuestionType71RequestBean()
val dataBean = AnswerQuestionType71RequestBean.DataBean()
dataBean.answer = answer
dataBean.cateId = optionId
if (mType70RequestList.size > 0 && mType70RequestList[0].data.answers.size > 0 && mType70RequestList[0].data.answers[0].optionId != null) {
dataBean.cateId = mType70RequestList[0].data.answers[0].optionId
}
answerQuestionType71RequestBean.data = dataBean
toUid.let {
answerQuestionType71RequestBean.toUid = toUid
}
......
......@@ -2,10 +2,10 @@
<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:id="@+id/type5_parent"
android:paddingLeft="12dp"
android:layout_height="wrap_content">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp">
<ImageView
android:id="@+id/iv_header"
......@@ -13,24 +13,26 @@
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
app:layout_constraintHorizontal_weight="1"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:orientation="vertical"
android:padding="12dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintRight_toLeftOf="@id/iv_right"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/multiple_choice_title"
android:layout_width="239dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
......@@ -40,7 +42,7 @@
<TextView
android:id="@+id/tv_notes"
android:layout_width="239dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:text="@string/question_notes"
......@@ -57,7 +59,7 @@
<TextView
android:id="@+id/example"
android:layout_width="239dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/platform_dp_14"
......@@ -66,4 +68,12 @@
</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
......@@ -3,7 +3,8 @@
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_height="wrap_content"
android:padding="12dp">
<ImageView
android:id="@+id/iv_header"
......@@ -11,21 +12,27 @@
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:orientation="vertical"
android:padding="12dp"
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">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:padding="12dp">
<TextView
android:id="@+id/more_title"
android:layout_width="wrap_content"
......@@ -34,38 +41,46 @@
android:textSize="@dimen/im_text_size_17"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="请问是发生了什么事情导致的呢?(多选)?"/>
tools:text="请问是发生了什么事多选)?" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tv_more_list"
android:layout_width="263dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/more_title"
android:layout_gravity="center_horizontal"
android:orientation="vertical"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintStart_toStartOf="@id/multiple_choice_title"
app:layout_constraintTop_toBottomOf="@id/multiple_choice_title"
tools:itemCount="6"
tools:listitem="@layout/left_one_check_layout_item"
tools:spanCount="2" />
tools:spanCount="2"
tools:visibility="visible" />
<TextView
android:id="@+id/tv_more_define"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:textColor="@color/white"
android:layout_below="@id/tv_more_list"
android:layout_marginTop="16dp"
android:background="@drawable/im_background_18dp_ebebeb"
android:gravity="center"
android:layout_alignParentRight="true"
android:paddingTop="@dimen/platform_dp_8"
android:paddingBottom="@dimen/platform_dp_8"
android:text="确定"
android:textSize="@dimen/im_text_size_15">
</TextView>
android:textColor="@color/white"
android:textSize="@dimen/im_text_size_15"
tools:visibility="visible" />
</RelativeLayout>
</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
......@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="12dp">
android:padding="12dp">
<ImageView
android:id="@+id/iv_header"
......@@ -12,22 +12,27 @@
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:maxWidth="263dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:orientation="vertical"
android:padding="12dp"
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">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:padding="12dp">
<TextView
android:id="@+id/multiple_choice_title"
android:layout_width="wrap_content"
......@@ -40,17 +45,26 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tv_one_list"
android:layout_width="263dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/multiple_choice_title"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="8dp"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
tools:itemCount="6"
tools:listitem="@layout/left_one_check_layout_item"
tools:spanCount="2"
tools:visibility="visible" />
</RelativeLayout>
</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
......@@ -4,9 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="12dp"
android:paddingTop="12dp"
android:paddingBottom="12dp">
android:padding="12dp">
<ImageView
android:id="@+id/iv_header"
......@@ -14,23 +12,39 @@
android:layout_height="36dp"
android:layout_centerVertical="true"
android:src="@drawable/im_ico_default_avatar"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="vertical"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
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">
<TextView
android:id="@+id/tv_left_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@drawable/im_custom_message_round_white_6dp_bg"
android:maxWidth="270dp"
android:padding="12dp"
android:textColor="@color/im_color_242424"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_header"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_weight="1"
tools:text="你好,为了更好的帮助您我们需要了解些基本信息,我们将会严格保护你的隐私安全,请放心。" />
</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
......@@ -4,9 +4,15 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="12dp"
android:paddingRight="12dp"
android:paddingBottom="12dp">
android:padding="12dp">
<View
android:id="@+id/iv_left"
android:layout_width="36dp"
android:layout_height="36dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.cardview.widget.CardView
android:id="@+id/cv_header"
......@@ -14,7 +20,6 @@
android:layout_height="36dp"
android:elevation="0dp"
app:cardCornerRadius="18dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
......@@ -25,20 +30,31 @@
android:layout_centerVertical="true"
android:src="@drawable/platform_head_place_hold_pic" />
</androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="right"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@id/iv_left"
app:layout_constraintRight_toLeftOf="@id/cv_header"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_right_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:background="@drawable/im_question_message_round_1da1f2_8dp_bg"
android:maxWidth="270dp"
android:textColor="@color/white"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/cv_header"
app:layout_constraintTop_toTopOf="parent"
tools:text="你好,为了更好的帮助您我们需要了解些基本信息,我们将会严格保护你的隐私安全,请放心。" />
tools:text="你好,为了更好的。" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -16,20 +16,11 @@
android:layout_width="36dp"
android:layout_height="44dp"
android:paddingStart="16dp"
android:paddingTop="10dp"
android:paddingEnd="12dp"
android:paddingBottom="10dp"
android:paddingTop="14dp"
android:paddingEnd="16dp"
android:paddingBottom="14dp"
android:scaleType="centerCrop"
android:src="@drawable/im_titlebar_back" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="26dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginRight="6dp"
android:layout_toLeftOf="@+id/tv_title"
android:src="@drawable/im_ico_default_avatar" />
android:src="@drawable/question_title_back" />
<TextView
android:id="@+id/tv_title"
......@@ -103,7 +94,7 @@
android:background="@color/white"
android:gravity="top"
android:hint="请简单描述遇到的问题......"
android:maxHeight="200dp"
android:maxHeight="100dp"
android:padding="12dp"
android:textColor="@color/color_242424"
android:textColorHint="@color/color_bfbfbf"
......@@ -117,7 +108,7 @@
android:id="@+id/hsv_problem_tips"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="69dp"
android:paddingRight="85dp"
android:layout_marginBottom="14dp"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
......@@ -136,8 +127,10 @@
android:layout_height="28dp"
android:background="@drawable/bg_shape_f8f8f8_r4"
android:drawableStart="@mipmap/ic_input_add"
android:drawablePadding="5dp"
android:drawablePadding="2dp"
android:gravity="center"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="当前问题"
......@@ -151,7 +144,7 @@
android:layout_marginStart="12dp"
android:background="@drawable/bg_shape_f8f8f8_r4"
android:drawableStart="@mipmap/ic_input_add"
android:drawablePadding="5dp"
android:drawablePadding="2dp"
android:gravity="center"
android:paddingStart="8dp"
android:paddingEnd="8dp"
......@@ -166,7 +159,7 @@
android:layout_marginStart="12dp"
android:background="@drawable/bg_shape_f8f8f8_r4"
android:drawableStart="@mipmap/ic_input_add"
android:drawablePadding="5dp"
android:drawablePadding="2dp"
android:gravity="center"
android:paddingStart="8dp"
android:paddingEnd="8dp"
......@@ -179,10 +172,10 @@
<LinearLayout
android:id="@+id/ll_send"
android:layout_width="86dp"
android:layout_height="36dp"
android:layout_marginBottom="8dp"
android:background="#80ffffff"
android:gravity="center"
android:layout_height="0dp"
app:layout_constraintVertical_weight="1"
android:background="@color/white"
android:gravity="center|bottom"
app:layout_constraintBottom_toBottomOf="@id/et_input_problem"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/et_input_problem">
......@@ -195,9 +188,7 @@
android:gravity="center"
android:text="发送"
android:textColor="@color/white"
android:textSize="15sp"
android:visibility="gone"
tools:visibility="visible" />
android:textSize="15sp"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
......
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