Commit aa3203dd by 刘鹏

feat : 系统消息界面UI完成

parent da541843
...@@ -35,7 +35,7 @@ ext { ...@@ -35,7 +35,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.40.69", "ydl-platform" : "0.0.40.73",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.56", "ydl-webview" : "0.0.38.56",
...@@ -120,7 +120,7 @@ ext { ...@@ -120,7 +120,7 @@ ext {
//-------------- 功能组件 -------------- //-------------- 功能组件 --------------
//第一步 //第一步
"ydl-platform" : "0.0.40.69", "ydl-platform" : "0.0.40.73",
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.56", "ydl-webview" : "0.0.38.56",
......
...@@ -296,5 +296,11 @@ ...@@ -296,5 +296,11 @@
android:name="com.yidianling.medical.archives.MedicalEditArchivesActivity" android:name="com.yidianling.medical.archives.MedicalEditArchivesActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" /> android:theme="@style/platform_NoTitleTheme" />
<!--医疗系统消息-->
<activity
android:name="com.yidianling.medical.im.SystemMessageListActivity"
android:screenOrientation="portrait"
android:theme="@style/platform_NoTitleTheme" />
</application> </application>
</manifest> </manifest>
package com.yidianling.medical.im
import android.content.Context
import android.content.Intent
import android.view.LayoutInflater
import android.view.View
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import com.chad.library.adapter.base.BaseQuickAdapter
import com.ydl.ydlcommon.base.BaseActivity
import com.ydl.ydlcommon.utils.StatusBarUtils
import com.ydl.ydlcommon.utils.Utils
import com.yidianling.im.R
import com.yidianling.medical.im.adapter.MedicalSystemListAdapter
import com.yidianling.medical.widgets.LoadMoreView
import kotlinx.android.synthetic.main.medical_system_list_activity.*
import kotlinx.coroutines.*
import java.util.*
/**
* 系统消息列表
* @author liupeng
* */
class SystemMessageListActivity : BaseActivity(), SwipeRefreshLayout.OnRefreshListener,
BaseQuickAdapter.RequestLoadMoreListener {
private lateinit var mEmptyView: View
private lateinit var mAdapter: MedicalSystemListAdapter
companion object {
private lateinit var mDoctorId: String
private lateinit var mDoctorUid: String
@JvmStatic
fun start(context: Context, doctorId: String, doctorUid: String) {
val starter = Intent(context, SystemMessageListActivity::class.java)
.putExtra("doctorId", doctorId)
.putExtra("doctorUid", doctorUid)
context.startActivity(starter)
}
}
override fun layoutResId(): Int {
return R.layout.medical_system_list_activity
}
override fun initDataAndEvent() {
initStatus()
mEmptyView = LayoutInflater.from(this@SystemMessageListActivity)
.inflate(R.layout.platform_list_empty_view, null, false)
mAdapter = MedicalSystemListAdapter()
system_list.layoutManager =
LinearLayoutManager(this@SystemMessageListActivity, LinearLayoutManager.VERTICAL, false)
system_list.adapter = mAdapter
mAdapter.setOnItemClickListener { adapter, view, position ->
if (Utils.isFastClick()) {
//防止连击
return@setOnItemClickListener
}
}
mAdapter.setLoadMoreView(LoadMoreView())
mAdapter.setOnLoadMoreListener(this@SystemMessageListActivity, system_list)
system_swipe_refresh_layout?.setOnRefreshListener(this)
system_swipe_refresh_layout?.setColorSchemeColors(
ContextCompat.getColor(this@SystemMessageListActivity, R.color.platform_main_theme)
)
system_swipe_refresh_layout?.setProgressViewOffset(false, 0, 200)
}
override fun onRefresh() {
}
override fun onLoadMoreRequested() {
}
private fun initStatus() {
StatusBarUtils.setTransparentForImageView(this@SystemMessageListActivity, null)
StatusBarUtils.statusBarLightMode(this@SystemMessageListActivity)
}
}
\ No newline at end of file
package com.yidianling.medical.im.adapter
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.yidianling.im.R
import com.yidianling.im.bean.SystemMsgBean
/**
* 医生系统消息item adapter
*/
class MedicalSystemListAdapter : BaseQuickAdapter<SystemMsgBean.SystemMBean?, BaseViewHolder>(R.layout.medical_item_system_list) {
override fun convert(helper: BaseViewHolder, item: SystemMsgBean.SystemMBean?) {
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
android:paddingLeft="16dp"
android:paddingRight="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="24dp"
android:textColor="#ff8595a9"
android:textSize="14sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="2022-02-18" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/medical_bg_ffffff_8dp"
android:elevation="0dp"
app:cardElevation="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="12dp"
android:paddingTop="16dp"
android:paddingEnd="12dp"
android:paddingBottom="16dp">
<ImageView
android:id="@+id/system_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/medical_system_icon"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/system_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="处方消息提醒"
android:textColor="#ff0c1d31"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/system_icon"
app:layout_constraintLeft_toRightOf="@id/system_icon"
app:layout_constraintTop_toTopOf="@id/system_icon" />
<TextView
android:id="@+id/system_dec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="您的处方已审核通过"
android:textColor="#ff495c72"
android:textSize="14sp"
app:layout_constraintLeft_toLeftOf="@id/system_icon"
app:layout_constraintTop_toBottomOf="@id/system_icon" />
<View
android:id="@+id/center_line"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_marginTop="16dp"
android:background="@color/medical_color_e7ecf0"
app:layout_constraintTop_toBottomOf="@id/system_dec" />
<TextView
android:id="@+id/look_dec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="查看详情"
android:textColor="#ff0c1d31"
android:textSize="14sp"
app:layout_constraintLeft_toLeftOf="@id/system_icon"
app:layout_constraintTop_toBottomOf="@id/center_line" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/medical_icon_arrow_right"
app:layout_constraintBottom_toBottomOf="@id/look_dec"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/look_dec" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
\ 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="@color/white"
android:elevation="0dp"
android:gravity="bottom"
app:contentInsetStart="0dp"
app:layout_collapseMode="pin"
app:layout_constraintTop_toTopOf="parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="56dp"
android:ellipsize="end"
android:gravity="center"
android:maxEms="10"
android:maxLines="1"
android:text="系统消息"
android:textColor="@color/medical_color_10233a"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/iv_back"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:paddingStart="16dp"
android:paddingEnd="20dp"
android:src="@mipmap/medical_icon_title_back" />
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/system_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#f6f7f9"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/toolbar"
app:layout_constraintVertical_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/system_list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ 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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/empty_img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/platform_list_empty_icon"
app:layout_constraintBottom_toTopOf="@id/net_error"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed" />
<TextView
android:layout_marginTop="20dp"
android:id="@+id/net_error"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="网络异常,请稍后再试"
android:textColor="#8595a9"
android:textSize="14sp"
app:layout_constraintBottom_toTopOf="@id/reLoad"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/empty_img" />
<TextView
android:id="@+id/reLoad"
android:layout_width="120dp"
android:layout_height="62dp"
android:background="@drawable/platform_medical_login_bg"
android:gravity="center"
android:text="重新加载"
android:visibility="gone"
android:textColor="@color/white"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/net_error" />
</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