中建365-二期开发
parent
6ecfd7a475
commit
ce4d2d84b2
@ -0,0 +1,18 @@
|
|||||||
|
package com.zj365.health.adapter.healthrecord
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.xty.base.adapter.BaseAdapter
|
||||||
|
import com.zj365.health.R
|
||||||
|
|
||||||
|
class HealthRecordsAdapter : BaseAdapter<Any>(R.layout.item_health_report_record) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: Any) {
|
||||||
|
|
||||||
|
var imgAdapter = HealthRecordsChildAdapter()
|
||||||
|
var recycler = holder.getView<RecyclerView>(R.id.recycler)
|
||||||
|
|
||||||
|
recycler.adapter = imgAdapter
|
||||||
|
recycler.layoutManager = LinearLayoutManager(context,LinearLayoutManager.HORIZONTAL,false)
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package com.zj365.health.adapter.healthrecord
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.xty.base.adapter.BaseAdapter
|
||||||
|
import com.zj365.health.R
|
||||||
|
|
||||||
|
class HealthRecordsChildAdapter : BaseAdapter<Any>(R.layout.item_health_report_record_child) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: Any) {
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.zj365.health.vm
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.xty.base.vm.BaseVm
|
||||||
|
import com.xty.network.model.BalanceDietBean
|
||||||
|
import com.xty.network.model.RespBody
|
||||||
|
|
||||||
|
class HealthRecordMainVm : BaseVm() {
|
||||||
|
|
||||||
|
val balanceDietBeanLiveData by lazy { MutableLiveData<RespBody<BalanceDietBean>>() }
|
||||||
|
fun getBalanceDiet(){
|
||||||
|
startHttp {
|
||||||
|
var response = apiInterface().getBalanceDiet()
|
||||||
|
response.getCodeStatus(balanceDietBeanLiveData, nowData)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
<?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"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.ruffian.library.widget.RImageView
|
||||||
|
android:layout_width="@dimen/dp_70"
|
||||||
|
android:layout_height="@dimen/dp_70"
|
||||||
|
app:corner_radius="@dimen/dp_5"
|
||||||
|
app:is_circle="false"/>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.zj365.mime.act.electronicfence
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import com.xty.base.act.BaseVmAct
|
||||||
|
import com.xty.base.vm.BaseVm
|
||||||
|
import com.zj365.mime.databinding.ActivityElectronicFenceSettingBinding
|
||||||
|
|
||||||
|
class ElectronicFenceSettingAct : BaseVmAct<BaseVm>() {
|
||||||
|
|
||||||
|
val binding by lazy { ActivityElectronicFenceSettingBinding.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,79 @@
|
|||||||
|
<?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"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<include layout="@layout/title_white_bar"
|
||||||
|
android:id="@+id/title"/>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<com.amap.api.maps.MapView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_355"
|
||||||
|
android:id="@+id/map"/>
|
||||||
|
|
||||||
|
<com.ruffian.library.widget.RRelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_338"
|
||||||
|
app:corner_radius_top_left="@dimen/dp_12"
|
||||||
|
app:corner_radius_top_right="@dimen/dp_12"
|
||||||
|
app:background_normal="@color/white"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
>
|
||||||
|
|
||||||
|
<include layout="@layout/layout_empyt_no_data"
|
||||||
|
android:id="@+id/in_empty"
|
||||||
|
android:layout_above="@+id/ll_btn"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/recycler"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_btn"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_marginLeft="@dimen/dp_12"
|
||||||
|
android:layout_marginRight="@dimen/dp_12"
|
||||||
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
android:layout_above="@+id/recycler"
|
||||||
|
android:layout_alignParentBottom="true">
|
||||||
|
|
||||||
|
<com.ruffian.library.widget.RTextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_42"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:corner_radius="@dimen/dp_12"
|
||||||
|
app:background_normal="@color/col_eee"
|
||||||
|
android:text="点击设置"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:layout_marginRight="@dimen/dp_11"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/col_333"/>
|
||||||
|
<com.ruffian.library.widget.RTextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_42"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:corner_radius="@dimen/dp_12"
|
||||||
|
app:background_normal="@color/col_02c"
|
||||||
|
android:text="点击设置"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/white"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.ruffian.library.widget.RRelativeLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:padding="@dimen/dp_16">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="位置"
|
||||||
|
android:textColor="@color/col_333"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:textColor="@color/col_333"
|
||||||
|
android:layout_marginTop="@dimen/dp_22"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="范围半径"
|
||||||
|
android:textColor="@color/col_333"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="预警类型"
|
||||||
|
android:textColor="@color/col_333"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:textStyle="bold"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@mipmap/bg_empty"
|
||||||
|
android:layout_gravity="center"/>
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/col_333"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
android:text="暂无设置电子围栏~"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:layout_gravity="center"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
@ -0,0 +1,4 @@
|
|||||||
|
package com.xty.network.model
|
||||||
|
|
||||||
|
data class BalanceDietBean(var fat_percent:Int,var protein_percent:Int,var heat_val:String,var cho_percent:Int) {
|
||||||
|
}
|
Loading…
Reference in New Issue