中建365
parent
8dfa64ec75
commit
7dca4b772c
@ -0,0 +1,21 @@
|
||||
package com.zj365.dc.vm
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.network.model.RespBody
|
||||
import org.json.JSONObject
|
||||
|
||||
class OneKeyBinderDeviceVm : BaseVm() {
|
||||
|
||||
val bindResult by lazy { MutableLiveData<RespBody<Any>>() }
|
||||
|
||||
fun binderDevice(dataCode:String){
|
||||
|
||||
startHttp(true) {
|
||||
val jsonObject =JSONObject()
|
||||
jsonObject.put("dataCode",dataCode)
|
||||
val body = apiInterface().binderDevice(retrofits.getRequestBody(jsonObject.toString()))
|
||||
body.getCodeStatus(bindResult,nowData)
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,17 @@
|
||||
package com.zj365.health.act.psychological
|
||||
|
||||
import android.view.View
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.databinding.ActPsychologicalQuestionnaireBinding
|
||||
|
||||
class PsychologicalQuestionnaireAct : BaseVmAct<BaseVm>() {
|
||||
|
||||
val binding by lazy { ActPsychologicalQuestionnaireBinding.inflate(layoutInflater) }
|
||||
|
||||
override fun liveObserver() {
|
||||
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.zj365.health.act.psychological
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.adapter.psychological.PsychologicalRecommendAdapter
|
||||
import com.zj365.health.databinding.ActPsychologicalResultBinding
|
||||
|
||||
class PsychologicalResultAct: BaseVmAct<BaseVm>() {
|
||||
val binding by lazy { ActPsychologicalResultBinding.inflate(layoutInflater) }
|
||||
|
||||
val mAdapter by lazy { PsychologicalRecommendAdapter() }
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text = "性格测试总结"
|
||||
binding.title.mIvBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
|
||||
binding.recycler.layoutManager = LinearLayoutManager(this)
|
||||
binding.recycler.adapter = mAdapter
|
||||
}
|
||||
|
||||
override fun liveObserver() {
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.zj365.health.act.psychological
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.zj365.health.adapter.psychological.PsychologicalTestMainAdapter
|
||||
import com.zj365.health.databinding.ActPsychologicalTestMainBinding
|
||||
|
||||
class PsychologicalTestMainAct : BaseVmAct<BaseVm>() {
|
||||
val binding by lazy { ActPsychologicalTestMainBinding.inflate(layoutInflater) }
|
||||
|
||||
val mAdapter by lazy { PsychologicalTestMainAdapter() }
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text = "心理测试"
|
||||
binding.title.mIvBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
|
||||
binding.recycler.layoutManager = LinearLayoutManager(this)
|
||||
binding.recycler.adapter = mAdapter
|
||||
mAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun liveObserver() {
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.zj365.health.adapter.psychological
|
||||
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.zj365.health.R
|
||||
|
||||
class PsychologicalRecommendAdapter : BaseAdapter<Any>(R.layout.item_psychological_recommend) {
|
||||
override fun convert(holder: BaseViewHolder, item: Any) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.zj365.health.adapter.psychological
|
||||
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.zj365.health.R
|
||||
|
||||
class PsychologicalTestMainAdapter : BaseAdapter<Any>(R.layout.item_psychokogical_test) {
|
||||
override fun convert(holder: BaseViewHolder, item: Any) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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"/>
|
||||
|
||||
<WebView
|
||||
android:id="@+id/wvContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/title"
|
||||
android:layout_margin="@dimen/dp_14"
|
||||
android:background="@drawable/shape_white_8radius"
|
||||
android:padding="@dimen/dp_10"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_submit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginBottom="@dimen/dp_24"
|
||||
android:background="@drawable/shape_r25_02c"
|
||||
android:text="提 交"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:gravity="center"/>
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,98 @@
|
||||
<?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="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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_8round_white"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_22"
|
||||
android:paddingBottom="@dimen/dp_24"
|
||||
android:layout_margin="@dimen/dp_14">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="测试总结"
|
||||
android:textColor="#313131"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="@dimen/dp_10"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="测试总结仅供参考"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_14"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_summary"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_313"
|
||||
android:id="@+id/tv_summary_content"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/shape_8round_white"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_22"
|
||||
android:paddingBottom="@dimen/dp_24">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:text="测试推荐"
|
||||
android:textColor="#313131"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginBottom="@dimen/dp_10"/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id='@+id/recycler'/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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="@dimen/dp_97"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginLeft="@dimen/dp_14">
|
||||
|
||||
<com.ruffian.library.widget.RImageView
|
||||
android:id="@+id/img_psy"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:is_circle="false"
|
||||
app:corner_radius="@dimen/dp_8"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_psy"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_23"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="性格测试"
|
||||
android:layout_gravity="center"
|
||||
/>
|
||||
|
||||
</FrameLayout>
|
@ -0,0 +1,44 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.ruffian.library.widget.RImageView
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_77"
|
||||
app:is_circle="true"
|
||||
app:corner_radius="@dimen/dp_8"
|
||||
android:id="@+id/img_recommend"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/col_333"
|
||||
android:textSize="@dimen/sp_17"
|
||||
tools:text="心理测试"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_toRightOf="@+id/img_recommend"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_person_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/col_888"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_below="@+id/tv_title"
|
||||
tools:text="300人"
|
||||
android:layout_marginLeft="@dimen/dp_17"
|
||||
android:layout_toRightOf="@+id/img_recommend"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</RelativeLayout>
|
Binary file not shown.
Loading…
Reference in New Issue