中建365-优化/bug修复
parent
ddb7b5f2ed
commit
bf5eb0aa81
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
|
||||
<solid
|
||||
android:color="#EBF0F2"/>
|
||||
|
||||
<size
|
||||
android:height="0.5dp"/>
|
||||
|
||||
</shape>
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,50 @@
|
||||
package com.zj365.health.act.familyhealth
|
||||
|
||||
import android.graphics.Rect
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.DividerItemDecoration
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.common.arouter.ARouterUrl
|
||||
import com.zj365.health.R
|
||||
import com.zj365.health.adapter.familyhealth.FamilyHealthRealTimeAdapter
|
||||
import com.zj365.health.databinding.ActFamilyHealthRealTimeBinding
|
||||
|
||||
/**
|
||||
* 家人健康-实时
|
||||
*/
|
||||
@Route(path = ARouterUrl.FAMILY_HEALTH_REAL_TIME_ACT)
|
||||
class FamilyHealthRealTimeAct : BaseVmAct<BaseVm>() {
|
||||
|
||||
val binding by lazy { ActFamilyHealthRealTimeBinding.inflate(layoutInflater) }
|
||||
|
||||
val mAdapter by lazy { FamilyHealthRealTimeAdapter() }
|
||||
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.layoutManager = LinearLayoutManager(this)
|
||||
binding.recycler.adapter = mAdapter
|
||||
var dividerItemDecoration = DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
|
||||
dividerItemDecoration.setDrawable(resources.getDrawable(R.drawable.shape_ebf_0_5))
|
||||
binding.recycler.addItemDecoration(dividerItemDecoration)
|
||||
mAdapter.addChildClickViewIds(R.id.tv_real_time_mearsure)
|
||||
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.zj365.health.adapter.familyhealth
|
||||
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.zj365.health.R
|
||||
|
||||
class FamilyHealthRealTimeAdapter : BaseAdapter<Any>(R.layout.item_family_health_real_time) {
|
||||
override fun convert(holder: BaseViewHolder, item: Any) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.zj365.mime.act
|
||||
|
||||
import android.graphics.Rect
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.xty.base.act.BaseListAct
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.common.SizeUtil
|
||||
import com.xty.common.arouter.ARouterUrl
|
||||
import com.zj365.mime.adapter.EnterpriseInformationAdapter
|
||||
import com.zj365.mime.databinding.ActEnterpriseInformationBinding
|
||||
|
||||
/**
|
||||
* 企业资料
|
||||
*/
|
||||
@Route(path = ARouterUrl.ENTERPRISE_INFO)
|
||||
class EnterpriseInformationAct : BaseListAct<BaseVm>() {
|
||||
val binding by lazy { ActEnterpriseInformationBinding.inflate(layoutInflater) }
|
||||
|
||||
val mAdapter by lazy { EnterpriseInformationAdapter() }
|
||||
override fun initAdapter() {
|
||||
binding.recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
binding.recyclerView.adapter = mAdapter
|
||||
setRecycleRefresh(binding.recyclerView,binding.mRefresh,true)
|
||||
/* binding.recyclerView.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
||||
override fun getItemOffsets(outRect: Rect, itemPosition: Int, parent: RecyclerView) {
|
||||
super.getItemOffsets(outRect, itemPosition, parent)
|
||||
if (itemPosition == 0){
|
||||
|
||||
}else{
|
||||
outRect.set(0, SizeUtil.dp2px(this@EnterpriseInformationAct,12f))
|
||||
}
|
||||
}
|
||||
})*/
|
||||
}
|
||||
|
||||
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,21 @@
|
||||
package com.zj365.mime.adapter
|
||||
|
||||
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.mime.R
|
||||
|
||||
class EnterpriseInformationAdapter : BaseAdapter<Any>(R.layout.item_enterprise_info) {
|
||||
|
||||
val mAdapter by lazy { EnterpriseInformationChildAdapter() }
|
||||
override fun convert(holder: BaseViewHolder, item: Any) {
|
||||
|
||||
var recyclerView = holder.getView<RecyclerView>(R.id.recycler)
|
||||
|
||||
recyclerView.layoutManager = LinearLayoutManager(context)
|
||||
recyclerView.adapter = mAdapter
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.zj365.mime.adapter
|
||||
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.zj365.mime.R
|
||||
|
||||
class EnterpriseInformationChildAdapter : BaseAdapter<Any>(R.layout.item_enterprise_info_child) {
|
||||
override fun convert(holder: BaseViewHolder, item: Any) {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/col_6f7"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<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: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>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,67 @@
|
||||
<?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="wrap_content"
|
||||
android:paddingTop="@dimen/dp_28"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_13"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
android:background="@drawable/shape_round_white">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<com.ruffian.library.widget.RView
|
||||
android:id="@+id/view"
|
||||
android:layout_width="@dimen/dp_4"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
app:background_normal="@color/col_02c"
|
||||
app:corner_radius="2dp"
|
||||
android:layout_centerVertical="true"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
tools:text="企业动态"
|
||||
android:layout_marginLeft="@dimen/dp_10"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/icon_arrow_right"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="更多"
|
||||
android:layout_toLeftOf="@+id/img_right"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:textColor="@color/col_6B6"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_9"
|
||||
android:id="@+id/recycler"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
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_83"
|
||||
app:is_circle="false"
|
||||
android:scaleType="centerCrop"
|
||||
app:corner_radius="@dimen/dp_5"
|
||||
android:id="@+id/img_cover"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_info_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
android:textStyle="bold"
|
||||
tools:text="会议全面总结了经济工作,深刻分析了当前的经济形势的深刻分析了当前的经济形势的发深刻分析了当前的经济形势的发发..."
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@+id/img_cover"
|
||||
app:layout_constraintRight_toRightOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/col_6B6"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="@dimen/sp_11"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:drawableLeft="@mipmap/icon_news_times"
|
||||
android:layout_marginLeft="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_7"
|
||||
app:layout_constraintLeft_toRightOf="@+id/img_cover"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:text="2022-02-03 15:36"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_18"
|
||||
android:background="@mipmap/icon_link"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="@dimen/dp_7"
|
||||
app:layout_constraintLeft_toRightOf="@+id/mTime"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue