中建365-X2手表接入/二期有关UI开发
@ -0,0 +1,295 @@
|
||||
package com.zj365.dc.vm
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.common.TimeUtils
|
||||
import com.xty.common.util.CommonToastUtils
|
||||
import com.xty.network.model.ImageUploadBean
|
||||
import com.xty.network.model.NotAccepted
|
||||
import com.xty.network.model.PrevBean
|
||||
import com.xty.network.model.RespBody
|
||||
import com.zj365.dc.R
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.withContext
|
||||
import okhttp3.MultipartBody
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
|
||||
class BasicInfoVm : BaseVm() {
|
||||
|
||||
val setBasic by lazy {MutableLiveData<NotAccepted>()}
|
||||
val prevLive by lazy{MutableLiveData<RespBody<PrevBean>>()}
|
||||
val activeLive by lazy {MutableLiveData<NotAccepted>()}
|
||||
|
||||
fun submit(path: String,name:String,sex:String, icCard:String,height:String,weight:String,area:String,urgent:String,urgentPhone:String,urgentRelation:String
|
||||
,province:String,city:String,district:String,lat:String,lng:String,medicNames:String,medicIds:String,signPath:String,devNum:String,code:String,devMc:String,devName:String,diseaseList:String,birthDay:String,birthdayType:Int) {
|
||||
|
||||
// if(icCard.length!=18){
|
||||
// ToastUtils.show("请输入正确的身份证号")
|
||||
// return
|
||||
// }
|
||||
if(height.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入身高")
|
||||
return
|
||||
}
|
||||
|
||||
if (height.toFloat() < 50 || height.toFloat() > 260){
|
||||
CommonToastUtils.showToast("请输入正确身高")
|
||||
return
|
||||
}
|
||||
|
||||
if(weight.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入体重")
|
||||
return
|
||||
}
|
||||
|
||||
if(weight.toFloat() < 3 || weight.toFloat() > 300){
|
||||
CommonToastUtils.showToast("请输入正确体重")
|
||||
return
|
||||
}
|
||||
|
||||
if (TimeUtils.getAgeByBirth(birthDay) < 14){
|
||||
CommonToastUtils.showToast("需要年满14岁才可使用")
|
||||
return
|
||||
}
|
||||
|
||||
if(area.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入家庭住址")
|
||||
return
|
||||
}
|
||||
|
||||
if(medicIds.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请选择病史")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if(urgent.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入紧急联系人姓名")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if(urgentPhone.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入紧急联系人联系方式")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if(urgentRelation.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入关系")
|
||||
return
|
||||
}
|
||||
|
||||
if(devMc.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast(R.string.please_connect_device)
|
||||
return
|
||||
}
|
||||
if(devNum.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast(R.string.please_input_device_code)
|
||||
return
|
||||
}
|
||||
if(code.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast(R.string.please_input_active_code)
|
||||
return
|
||||
}
|
||||
if(signPath.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请完善签名")
|
||||
return
|
||||
}
|
||||
startHttp {
|
||||
withContext(Dispatchers.IO) {
|
||||
var fileId:String?=null
|
||||
if(!path.isNullOrEmpty()){
|
||||
var image = async { uploadImage(path) }
|
||||
val await = image.await()
|
||||
|
||||
fileId = await.fileId
|
||||
}
|
||||
var upload = async {uploadInfo(name,sex, icCard,height,weight,area,urgent,urgentPhone,urgentRelation,fileId,province,city,
|
||||
district,lat,lng,medicNames,medicIds,diseaseList,birthDay,birthdayType) }
|
||||
|
||||
val infoUpload = upload.await() //个人信息上传
|
||||
if(infoUpload.code==0){
|
||||
var activeDev =async { active(signPath,devNum,code,devMc,devName) }
|
||||
var signUpload=activeDev.await()
|
||||
if(signUpload.code==0){
|
||||
setBasic.postValue(infoUpload.data)
|
||||
}else{
|
||||
CommonToastUtils.showToast(signUpload.msg)
|
||||
}
|
||||
}else{
|
||||
CommonToastUtils.showToast(infoUpload.msg)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
fun submitNew(path: String,name:String,sex:String, icCard:String,height:String,weight:String,area:String,urgent:String,urgentPhone:String,urgentRelation:String
|
||||
,province:String,city:String,district:String,lat:String,lng:String,medicNames:String,medicIds:String ,diseaseList:String,birthDay:String,birthdayType:Int) {
|
||||
|
||||
// if(icCard.length!=18){
|
||||
// ToastUtils.show("请输入正确的身份证号")
|
||||
// return
|
||||
// }
|
||||
if(height.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入身高")
|
||||
return
|
||||
}
|
||||
|
||||
if (height.toFloat() < 50 || height.toFloat() > 260){
|
||||
CommonToastUtils.showToast("请输入正确身高")
|
||||
return
|
||||
}
|
||||
|
||||
if(weight.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入体重")
|
||||
return
|
||||
}
|
||||
|
||||
if(weight.toFloat() < 3 || weight.toFloat() > 300){
|
||||
CommonToastUtils.showToast("请输入正确体重")
|
||||
return
|
||||
}
|
||||
|
||||
if (TimeUtils.getAgeByBirth(birthDay) < 14){
|
||||
CommonToastUtils.showToast("需要年满14岁才可使用")
|
||||
return
|
||||
}
|
||||
|
||||
if(area.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入家庭住址")
|
||||
return
|
||||
}
|
||||
|
||||
if(medicIds.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请选择病史")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if(urgent.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入紧急联系人姓名")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if(urgentPhone.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入紧急联系人联系方式")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if(urgentRelation.isNullOrEmpty()){
|
||||
CommonToastUtils.showToast("请输入关系")
|
||||
return
|
||||
}
|
||||
|
||||
startHttp {
|
||||
withContext(Dispatchers.IO) {
|
||||
var fileId:String?=null
|
||||
if(!path.isNullOrEmpty()){
|
||||
var image = async { uploadImage(path) }
|
||||
val await = image.await()
|
||||
|
||||
fileId = await.fileId
|
||||
}
|
||||
var upload = async {uploadInfo(name,sex, icCard,height,weight,area,urgent,urgentPhone,urgentRelation,fileId,province,city,
|
||||
district,lat,lng,medicNames,medicIds,diseaseList,birthDay,birthdayType) }
|
||||
|
||||
val infoUpload = upload.await() //个人信息上传
|
||||
if(infoUpload.code==0){
|
||||
CommonToastUtils.showSucceedToast("提交成功")
|
||||
setBasic.postValue(infoUpload.data)
|
||||
}else{
|
||||
CommonToastUtils.showToast(infoUpload.msg)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun activeDevice(path:String,devNum:String,code:String,devMc:String,devName:String){
|
||||
startHttp {
|
||||
withContext(Dispatchers.IO){
|
||||
var file= File(path)
|
||||
var fileBody=MultipartBody.Part.createFormData("file",file.name,retrofits.getMultiPartFileRb(file))
|
||||
var response= apiInterface().activite(fileBody,retrofits.getRequestBody(devNum.replace(" ", "")),retrofits.getRequestBody(code.replace(" ", "")),retrofits.getRequestBody(devMc),retrofits.getRequestBody(devName))
|
||||
if (response.code == 0){
|
||||
activeLive.postValue(response.data)
|
||||
}else{
|
||||
CommonToastUtils.showToast(response.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活设备 签名文件上传
|
||||
*/
|
||||
private suspend fun active(path:String,devNum:String,code:String,devMc:String,devName:String):RespBody<NotAccepted>{
|
||||
var file= File(path)
|
||||
var fileBody=MultipartBody.Part.createFormData("file",file.name,retrofits.getMultiPartFileRb(file))
|
||||
var response= apiInterface().activite(fileBody,retrofits.getRequestBody(devNum.replace(" ", "")),retrofits.getRequestBody(code.replace(" ", "")),retrofits.getRequestBody(devMc),retrofits.getRequestBody(devName))
|
||||
return response
|
||||
}
|
||||
|
||||
|
||||
private suspend fun uploadInfo(name:String,sex:String, icCard:String,height:String,weight:String,area:String,
|
||||
urgent:String,urgentPhone:String,urgentRelation:String,
|
||||
fileId:String?,province:String,city:String,district:String,lat:String,lng:String,medicNames:String,medicIds:String,diseaseList:String,birthDay:String,birthdayType:Int): RespBody<NotAccepted> {
|
||||
var json=JSONObject()
|
||||
json.put("name",name)
|
||||
json.put("sex",sex)
|
||||
json.put("idCard",icCard)
|
||||
json.put("height",height)
|
||||
json.put("weight",weight)
|
||||
json.put("area",area)
|
||||
|
||||
json.put("medicalHistory",medicNames)
|
||||
json.put("historyId",medicIds)
|
||||
json.put("latitude",lat)
|
||||
json.put("longitude",lng)
|
||||
json.put("province",province)
|
||||
json.put("city",city)
|
||||
json.put("district",district)
|
||||
json.put("birthday",birthDay)
|
||||
json.put("birthdayType",birthdayType)
|
||||
if(diseaseList.isEmpty()){
|
||||
json.put("diseaseList","")
|
||||
}else{
|
||||
var array=JSONArray(diseaseList) //去掉转移的斜杠
|
||||
json.put("diseaseList",array)
|
||||
}
|
||||
|
||||
json.put("urgent",urgent)
|
||||
json.put("urgentPhone",urgentPhone)
|
||||
json.put("urgentRelation",urgentRelation)
|
||||
|
||||
if(!fileId.isNullOrEmpty()){
|
||||
json.put("avatarUrl",fileId)
|
||||
}
|
||||
var rb=retrofits.getRequestBody(json.toString())
|
||||
var body=apiInterface().setUpdateUser(rb)
|
||||
return body
|
||||
}
|
||||
|
||||
private suspend fun uploadImage(path: String): ImageUploadBean {
|
||||
var f = File(path)
|
||||
var fileRb =
|
||||
MultipartBody.Part.createFormData("file", f.name, retrofits.getMultiPartFileRb(f))
|
||||
var body = apiInterface().uploadImage(fileRb)
|
||||
return body.data
|
||||
}
|
||||
|
||||
|
||||
//1:用户协议 2:管家协议 3:隐私协议 7:佩戴须知
|
||||
// fun getPrev(type:Int){
|
||||
// startHttp {
|
||||
// var response=apiInterface().getPrev(type)
|
||||
// response.getCodeStatus(prevLive,nowData)
|
||||
// }
|
||||
// }
|
||||
}
|
@ -0,0 +1,253 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout 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">
|
||||
|
||||
<include
|
||||
android:id="@+id/title"
|
||||
layout="@layout/title_white_bar" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/mSubmit"
|
||||
android:layout_below="@+id/title"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:background="@drawable/shape_round_white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:background="@color/col_f1f" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mDeviceLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="@dimen/dp_10">
|
||||
|
||||
|
||||
<com.xty.common.weight.RequiredTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:text="@string/device"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mBlueTooth"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:drawableRight="@mipmap/ic_next"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center|right"
|
||||
android:hint="@string/please_connect_device"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_16" />
|
||||
|
||||
<View
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:background="@color/col_f1f" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="@dimen/dp_10">
|
||||
|
||||
<com.xty.common.weight.RequiredTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:singleLine="true"
|
||||
android:text="@string/device_code"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/mDevNum"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@null"
|
||||
android:gravity="center|right"
|
||||
android:hint="@string/please_input_device_code"
|
||||
android:maxLength="20"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_16" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:background="@color/col_f1f" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="@dimen/dp_10">
|
||||
|
||||
<com.xty.common.weight.RequiredTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:singleLine="true"
|
||||
android:text="@string/active_code"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/mActiveCode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@null"
|
||||
android:gravity="center|right"
|
||||
android:hint="@string/please_input_active_code"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_16" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:background="@color/col_f1f" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="@string/sign"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_18" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mSign"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
app:cardBackgroundColor="@color/col_f4f"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/confirm_sign"
|
||||
android:textColor="@color/col_B8B"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/mImageSign"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/mSign"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_gravity="right"-->
|
||||
<!-- android:layout_margin="@dimen/dp_15"-->
|
||||
<!-- android:background="@drawable/shape_btn_select_bg"-->
|
||||
<!-- android:paddingLeft="@dimen/dp_15"-->
|
||||
<!-- android:paddingTop="@dimen/dp_5"-->
|
||||
<!-- android:paddingRight="@dimen/dp_15"-->
|
||||
<!-- android:paddingBottom="@dimen/dp_5"-->
|
||||
<!-- android:text="签名"-->
|
||||
<!-- android:textColor="@color/white"-->
|
||||
<!-- android:textSize="@dimen/dp_16" />-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mPrivate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:drawableLeft="@drawable/selctor_check_sel"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center|left"
|
||||
android:text="@string/agree_private_active"
|
||||
android:textColor="@color/col_8a00"
|
||||
android:textColorHighlight="@android:color/transparent"
|
||||
android:textSize="@dimen/dp_20" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mSubmit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:autoSizeMaxTextSize="@dimen/dp_20"
|
||||
android:background="@drawable/shape_btn_select_bg"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_16" />
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,3 @@
|
||||
package com.xty.base.model
|
||||
data class ScienceDetailBean (var id:String){
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.xty.common.util
|
||||
|
||||
import com.xty.network.model.DeviceFunctionBean
|
||||
|
||||
object DeviceFunctionUtils {
|
||||
|
||||
fun hasFunction(functionList:ArrayList<DeviceFunctionBean>,functionType:String) : Boolean{
|
||||
functionList.forEach {
|
||||
if(it.type == functionType && it.status == 1){
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fun hasFunction(bean:DeviceFunctionBean,functionType:String):Boolean{
|
||||
if(bean.type == functionType && bean.status == 1){
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="#2902C191" />
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
|
||||
</shape>
|
||||
|
||||
</item>
|
||||
<item>
|
||||
|
||||
<!--clip 直接裁切的话 会成直角-->
|
||||
<scale android:scaleWidth="100%">
|
||||
<shape>
|
||||
<solid android:color="@color/col_02c" />
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
|
||||
</shape>
|
||||
|
||||
</scale>
|
||||
|
||||
</item>
|
||||
</layer-list>
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,16 @@
|
||||
package com.zj365.health.act.healthcode
|
||||
|
||||
import android.view.View
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.databinding.ActHealthBodyInquiryBinding
|
||||
|
||||
class HealthBodyInquiryAct : BaseVmAct<BaseVm>() {
|
||||
|
||||
val binding by lazy { ActHealthBodyInquiryBinding.inflate(layoutInflater) }
|
||||
|
||||
override fun liveObserver() {
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.zj365.health.act.healthcode
|
||||
|
||||
import android.view.View
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.databinding.ActHealthCodeMainBinding
|
||||
|
||||
class HealthCodeMainAct : BaseVmAct<BaseVm>() {
|
||||
val binding by lazy { ActHealthCodeMainBinding.inflate(layoutInflater) }
|
||||
override fun liveObserver() {
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.zj365.health.act.healthrecord
|
||||
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.adapter.familyhealth.HealthFamilyTargetAdapter
|
||||
import com.zj365.health.databinding.ActHealthRecordMainBinding
|
||||
|
||||
class HealthRecordMainAct : BaseVmAct<BaseVm>() {
|
||||
|
||||
val binding by lazy { ActHealthRecordMainBinding.inflate(layoutInflater) }
|
||||
|
||||
val mAdapter by lazy { HealthFamilyTargetAdapter() }
|
||||
|
||||
override fun liveObserver() {
|
||||
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text ="健康档案"
|
||||
binding.title.mIvBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
|
||||
initAdapter()
|
||||
}
|
||||
|
||||
fun initAdapter (){
|
||||
binding.recycler.adapter = mAdapter
|
||||
binding.recycler.layoutManager = LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false)
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.zj365.health.act.healthrecord
|
||||
|
||||
import android.view.View
|
||||
import com.xty.base.act.BaseListAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.databinding.ActHealthRecordBinding
|
||||
import com.zj365.health.databinding.ActHealthRecordsListBinding
|
||||
|
||||
class HealthRecordsListAct : BaseListAct<BaseVm>() {
|
||||
|
||||
val binding by lazy { ActHealthRecordsListBinding.inflate(layoutInflater) }
|
||||
override fun initAdapter() {
|
||||
}
|
||||
|
||||
override fun loadData() {
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text = "报告记录"
|
||||
binding.title.mIvBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun liveObserver() {
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.zj365.health.act.healthrecord
|
||||
|
||||
import android.view.View
|
||||
import com.xty.base.act.BaseListAct
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.databinding.ActUploadHealthRecordBinding
|
||||
|
||||
class UploadHealthRecordAct : BaseVmAct<BaseVm>() {
|
||||
|
||||
val binding by lazy { ActUploadHealthRecordBinding.inflate(layoutInflater) }
|
||||
|
||||
override fun liveObserver() {
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text = "上传报告"
|
||||
binding.title.mIvBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.zj365.health.vm
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.network.model.DeviceFunctionBean
|
||||
import com.xty.network.model.RespBody
|
||||
import org.json.JSONObject
|
||||
|
||||
class ComparePageDataVm :BaseVm() {
|
||||
|
||||
val functionLiveData by lazy { MutableLiveData<RespBody<MutableList<DeviceFunctionBean>>>() }
|
||||
fun getDeviceFunctionList(id:String){
|
||||
startHttp {
|
||||
val json = JSONObject()
|
||||
json.put("id", id)
|
||||
val body = apiInterface().getDeviceFunctionList(retrofits.getRequestBody(json.toString()))
|
||||
body.getCodeStatus(functionLiveData, nowData)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.zj365.health.vm
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.network.model.DeviceFunctionBean
|
||||
import com.xty.network.model.RespBody
|
||||
import org.json.JSONObject
|
||||
|
||||
class HealthMainVm : BaseVm() {
|
||||
|
||||
val functionLiveData by lazy { MutableLiveData<RespBody<MutableList<DeviceFunctionBean>>>() }
|
||||
fun getDeviceFunctionList(id:String){
|
||||
startHttp {
|
||||
val json = JSONObject()
|
||||
json.put("id", id)
|
||||
val body = apiInterface().getDeviceFunctionList(retrofits.getRequestBody(json.toString()))
|
||||
body.getCodeStatus(functionLiveData, nowData)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,184 @@
|
||||
<?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:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/col_6f7">
|
||||
|
||||
<include layout="@layout/title_white_bar"
|
||||
android:id="@+id/title"/>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:paddingTop="22dp"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="问诊科室"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:id="@+id/tv_department"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/img_video_inquiry"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="视频问诊"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_02c"
|
||||
android:drawablePadding="@dimen/dp_6"
|
||||
android:drawableLeft="@mipmap/icon_video_inquriy"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:paddingTop="22dp"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="概况"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:id="@+id/tv_survey"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:paddingTop="22dp"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="定义"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:id="@+id/tv_definition"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:paddingTop="22dp"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_22"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="病因"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:id="@+id/tv_pathogeny"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,567 @@
|
||||
<?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:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<include layout="@layout/title_white_bar"
|
||||
android:id="@+id/title"/>
|
||||
|
||||
<com.ruffian.library.widget.RRelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
app:corner_radius="@dimen/dp_18"
|
||||
app:background_normal="@color/col_2F2">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_search"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/ic_search"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="@dimen/dp_21"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="请输入症状、病因、身体反应"
|
||||
android:layout_toRightOf="@+id/img_search"
|
||||
android:layout_centerVertical="true"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:layout_marginLeft="@dimen/dp_7"/>
|
||||
|
||||
</com.ruffian.library.widget.RRelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全身性其他疾病"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_34"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_38"
|
||||
android:orientation="horizontal">
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_8"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_body"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/img_body"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/img_body"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="1"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="头部"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="2"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="颈部"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="3"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="胸部"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="4"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="腹部"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="5"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="腰部"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="6"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="骨盆"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_body"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/bg_person_body"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_body"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/img_body"
|
||||
app:layout_constraintLeft_toRightOf="@+id/img_body"
|
||||
app:layout_constraintRight_toRightOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="7"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="血液"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="8"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="皮肤"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="9"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="肌肉"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="10"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="骨骼"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="11"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="生殖"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<com.ruffian.library.widget.RTextView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
app:corner_radius="@dimen/dp_50"
|
||||
app:border_color_normal="@color/col_02c"
|
||||
app:background_normal="@color/white"
|
||||
app:border_width_normal="0.5dp"
|
||||
android:text="12"
|
||||
android:textColor="@color/col_02c"
|
||||
android:gravity="center"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="四肢"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:textColor="@color/col_313"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="12sp"
|
||||
tools:text="查看:187人"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,578 @@
|
||||
<?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:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/col_6f7">
|
||||
|
||||
<include layout="@layout/title_white_bar"
|
||||
android:id="@+id/title"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:layout_margin="@dimen/dp_14">
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginLeft="@dimen/dp_13"
|
||||
android:layout_marginRight="@dimen/dp_14">
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:layout_width="@dimen/dp_57"
|
||||
android:layout_height="@dimen/dp_57"
|
||||
android:id="@+id/img_avatar"
|
||||
android:background="@mipmap/icon_default_avator"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_toRightOf="@+id/img_avatar"
|
||||
tools:text="李晓芳"
|
||||
android:layout_marginLeft="@dimen/dp_10"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_complete_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="完善信息"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:drawableRight="@mipmap/icon_arrow_right"
|
||||
android:drawablePadding="@dimen/dp_5"/>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/mProgress"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_below="@+id/tv_name"
|
||||
android:layout_toRightOf="@+id/img_avatar"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_bg_info" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/tv_bmi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_18"
|
||||
tools:text="31"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv_bmi_desc"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="@color/col_91d"
|
||||
tools:text="肥胖"
|
||||
android:layout_marginLeft="@dimen/dp_7"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/col_C7C"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="BMI"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/tv_bmr"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_18"
|
||||
tools:text="31"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/col_C7C"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:text="BMR"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:id="@+id/tv_body_fat"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_18"
|
||||
tools:text="31"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:textColor="@color/col_C7C"
|
||||
android:text="体脂率"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.androidkun.xtablayout.XTabLayout
|
||||
android:id="@+id/xTablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
app:xTabDisplayNum="4"
|
||||
app:xTabIndicatorColor="@color/col_02c"
|
||||
app:xTabIndicatorHeight="@dimen/dp_3"
|
||||
app:xTabIndicatorRoundY="@dimen/dp_3"
|
||||
app:xTabIndicatorWidth="@dimen/dp_20"
|
||||
app:xTabMode="scrollable"
|
||||
app:xTabSelectedTextColor="@color/col_02c"
|
||||
app:xTabSelectedTextSize="@dimen/sp_16"
|
||||
app:xTabTextColor="@color/col_c7c"
|
||||
app:xTabTextSelectedBold="true"
|
||||
app:xTabTextSize="@dimen/sp_14" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clSelfTest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:paddingBottom="@dimen/dp_27">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvSelTest"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="自检自测"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<include
|
||||
android:id= "@+id/cl_body"
|
||||
layout="@layout/layout_health_record_test"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvSelTest"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clFoodDiary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:paddingBottom="@dimen/dp_27">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvFoodDiary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="饮食日记"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_balance_diet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="标准均衡饮食"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/col_313"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvFoodDiary"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_22"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="前往记录"
|
||||
android:drawableRight="@mipmap/icon_arrow_right"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvFoodDiary"
|
||||
android:layout_marginTop="@dimen/dp_22"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diet_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="还可摄入"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_c7c"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_balance_diet"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_calorie"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_19"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_diet_desc"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
<TextView
|
||||
android:id="@+id/tv_diet_calorie"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="29sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/col_313"
|
||||
tools:text="2315"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="千卡"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_39"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_calorie"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="碳水化合物"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_313"/>
|
||||
|
||||
<ProgressBar
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_below="@+id/tv_name"
|
||||
android:layout_toRightOf="@+id/img_avatar"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_bg_info" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
tools:text="55%"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginLeft="@dimen/dp_19"
|
||||
android:layout_weight="1">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蛋白质"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_313"/>
|
||||
|
||||
<ProgressBar
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_below="@+id/tv_name"
|
||||
android:layout_toRightOf="@+id/img_avatar"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_bg_info" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
tools:text="55%"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginLeft="@dimen/dp_19"
|
||||
android:layout_weight="1">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="脂肪"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_313"/>
|
||||
|
||||
<ProgressBar
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:layout_below="@+id/tv_name"
|
||||
android:layout_toRightOf="@+id/img_avatar"
|
||||
android:progress="0"
|
||||
android:progressDrawable="@drawable/progress_bg_info" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
tools:text="55%"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clHealthMonitoring"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:paddingBottom="@dimen/dp_27">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvHealthMonitoring"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="健康监测"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/recycler"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvHealthMonitoring"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clHealthRecording"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:paddingBottom="@dimen/dp_27">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvHealthRecording"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:drawableStart="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="健康记录"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginRight="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvHealthRecording"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/bg_home_item"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_inquiry_record"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="问诊记录"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/bg_home_item"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_report_record"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="报告记录"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_weight="1"
|
||||
android:background="@mipmap/bg_home_item"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_health_week_record"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="健康周报"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<include layout="@layout/title_white_bar"
|
||||
android:id="@+id/title"/>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/title"
|
||||
android:background="@color/col_f4f">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"/>
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_upload_report"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_margin="@dimen/dp_25"
|
||||
android:background="@drawable/shape_r25_02c"
|
||||
android:text="上传报告"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@mipmap/bg_health_record_test">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_25"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="67"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:text="健康分"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_9"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</FrameLayout>
|
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 147 KiB |
After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 4.6 KiB |
@ -1,3 +1,3 @@
|
||||
package com.xty.network.model
|
||||
|
||||
data class DeviceBean(val imageUrl:String,val watchTypeName:String,val watchType:Int,val deviceType:String)
|
||||
data class DeviceBean(val imageUrl:String,val watchTypeName:String,val watchType:Int,val deviceType:String,val bindType:Int)
|
||||
|