Commit 8cee3a49 by 刘鹏

feat : UI还原

parent 1eda3dfe
......@@ -11,7 +11,7 @@ ext {
"m-user" : "0.0.61.90",
"m-user-medical" : "0.0.61.99",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.14",
"m-im-medical" : "0.0.21.22",
"m-im" : "0.0.20.76",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......@@ -97,7 +97,7 @@ ext {
"m-user" : "0.0.61.90",
"m-user-medical" : "0.0.61.99",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.14",
"m-im-medical" : "0.0.21.22",
"m-im" : "0.0.20.76",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8",
......
......@@ -8,10 +8,12 @@ import com.alibaba.fastjson.JSONObject;
public class CustomAttachmentRecipel extends CustomAttachment {
private static final String KEY_FROM_RECIPELID = "recipelId";
private static final String KEY_FROM_SICKNESS = "sickness";
private static final String KEY_FROM_DIAGNOSETIME = "diagnoseTime";
private String fromRecipelId = "";
private String fromSickness = "";
private String fromDiagnoseTime = "";
public CustomAttachmentRecipel() {
super(CustomAttachmentType.TYPE_RECIPE);
......@@ -21,6 +23,7 @@ public class CustomAttachmentRecipel extends CustomAttachment {
protected void parseData(JSONObject data) {
fromRecipelId = data.getString(KEY_FROM_RECIPELID);
fromSickness = data.getString(KEY_FROM_SICKNESS);
fromDiagnoseTime = data.getString(KEY_FROM_DIAGNOSETIME);
}
@Override
......@@ -28,6 +31,7 @@ public class CustomAttachmentRecipel extends CustomAttachment {
JSONObject data = new JSONObject();
data.put(KEY_FROM_RECIPELID, fromRecipelId);
data.put(KEY_FROM_SICKNESS, fromSickness);
data.put(KEY_FROM_DIAGNOSETIME, fromDiagnoseTime);
return data;
}
......@@ -38,5 +42,8 @@ public class CustomAttachmentRecipel extends CustomAttachment {
public String getFromSickness() {
return fromSickness;
}
public String getFromDiagnoseTime() {
return fromDiagnoseTime;
}
}
......@@ -18,6 +18,7 @@ class MsgViewHolderRecipel(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) :
MsgViewHolderBase(adapter) {
private var name: TextView? = null
private var time: TextView? = null
private var item: ConstraintLayout? = null
var itemBean: CustomAttachmentRecipel? = null
override fun getContentResId(): Int {
......@@ -26,13 +27,14 @@ class MsgViewHolderRecipel(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) :
override fun inflateContentView() {
name = findViewById(R.id.name)
time = findViewById(R.id.recipel_time)
item = findViewById(R.id.item)
}
override fun bindContentView() {
itemBean = message.attachment as CustomAttachmentRecipel
name?.text = itemBean?.fromSickness
time?.text =itemBean?.fromDiagnoseTime
hideItemBg()
setAvatarRightInVisibity()
item?.setOnClickListener {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#f4f9ff" />
<stroke
android:width="1dp"
android:color="#803464ec" />
<corners android:radius="14dp" />
<padding
android:bottom="4dp"
android:left="12dp"
android:right="12dp"
android:top="4dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="263dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="@dimen/platform_dp_12"
android:maxWidth="263dp"
android:minWidth="200dp"
android:background="#e7ecf0"
app:cardBackgroundColor="#e7ecf0"
android:elevation="0dp"
app:cardBackgroundColor="#e7ecf0"
app:cardCornerRadius="8dp"
app:cardElevation="0dp">
......
......@@ -2,11 +2,13 @@
<androidx.cardview.widget.CardView 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="263dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="@dimen/platform_dp_12"
android:background="@color/white"
android:maxWidth="263dp"
android:minWidth="240dp"
android:elevation="0dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp">
......@@ -16,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxWidth="263dp"
android:minWidth="263dp"
android:minWidth="240dp"
android:padding="@dimen/platform_dp_12">
<TextView
......
......@@ -2,11 +2,13 @@
<androidx.cardview.widget.CardView 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="263dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="@dimen/platform_dp_12"
android:background="@color/white"
android:maxWidth="263dp"
android:minWidth="240dp"
android:elevation="0dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp">
......@@ -16,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxWidth="263dp"
android:minWidth="263dp"
android:minWidth="240dp"
android:padding="@dimen/platform_dp_12">
<TextView
......@@ -55,6 +57,32 @@
app:layout_constraintLeft_toRightOf="@id/tv_info"
tools:text="青少年忧郁症fdsafasdfsadfsdfdsaf" />
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="诊断时间:"
android:textColor="#ff8595a9"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/tv_info" />
<TextView
android:id="@+id/recipel_time"
android:layout_width="0dp"
app:layout_constraintHorizontal_weight="1"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:textColor="#ff0c1d31"
android:textSize="16sp"
android:maxLines="1"
android:ellipsize="end"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBaseline_toBaselineOf="@id/tv_time"
app:layout_constraintLeft_toRightOf="@id/tv_time"
tools:text="2022-02-19" />
<View
android:id="@+id/line_center"
android:layout_width="0dp"
......@@ -64,27 +92,23 @@
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_info" />
app:layout_constraintTop_toBottomOf="@id/tv_time" />
<TextView
android:id="@+id/detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginTop="14dp"
android:text="查看处方详情"
android:textColor="#ff8595a9"
android:background="@drawable/medical_bg_3464ec_14dp"
android:textColor="@color/medical_color_3464ec"
android:textSize="14sp"
android:layout_marginBottom="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/tv_title"
app:layout_constraintTop_toBottomOf="@id/line_center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/medical_icon_arrow_right"
app:layout_constraintBottom_toBottomOf="@id/detail"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/detail" />
</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