Compare commits
58 Commits
a95219ef17
...
d341d4cd19
Author | SHA1 | Date |
---|---|---|
|
d341d4cd19 | 1 year ago |
|
c8e33e9ceb | 1 year ago |
|
9ce9e3bcfc | 1 year ago |
|
50109919e0 | 1 year ago |
|
8f30196252 | 1 year ago |
|
fa3b7f5f91 | 1 year ago |
|
7f8a277e74 | 1 year ago |
|
8ab6168b2c | 1 year ago |
|
f25d554a79 | 1 year ago |
|
c5831b0f18 | 1 year ago |
|
1b6900b0d3 | 1 year ago |
|
572205947c | 1 year ago |
|
b90ec080e1 | 1 year ago |
|
65928255f2 | 1 year ago |
|
c12c462f2a | 1 year ago |
|
3f31373b05 | 1 year ago |
|
0709084f5e | 1 year ago |
|
6ee1c828f2 | 1 year ago |
|
a0554fb580 | 1 year ago |
|
5dbace084c | 1 year ago |
|
9fd816ed10 | 1 year ago |
|
638318bdf9 | 1 year ago |
|
4547893d65 | 1 year ago |
|
ad11f62f87 | 1 year ago |
|
b87593ce06 | 1 year ago |
|
21c2213ff1 | 1 year ago |
|
e0b4a9119b | 1 year ago |
|
edb90ce381 | 1 year ago |
|
877247f577 | 1 year ago |
|
be8c4a5e7e | 1 year ago |
|
c8bc5dd436 | 1 year ago |
|
d3c1305b62 | 1 year ago |
|
e5adb8e3ae | 1 year ago |
|
643141ae08 | 1 year ago |
|
c1af609169 | 1 year ago |
|
7902e124a6 | 1 year ago |
|
abd6048cae | 1 year ago |
|
29d5da918a | 1 year ago |
|
6204cdd05e | 1 year ago |
|
74a931980f | 1 year ago |
|
84da7605ae | 1 year ago |
|
ad130c609f | 1 year ago |
|
380b9694cc | 1 year ago |
|
886d9fcf30 | 1 year ago |
|
9fa56534b6 | 1 year ago |
|
423c32ae16 | 1 year ago |
|
d187dadab9 | 1 year ago |
|
92f3f6f0f0 | 1 year ago |
|
dbd348d099 | 1 year ago |
|
52075ffabc | 1 year ago |
|
eda1955a7e | 1 year ago |
|
1faf1b65e5 | 1 year ago |
|
35996556a9 | 1 year ago |
|
c31e4d3f7b | 1 year ago |
|
ca2dfddaa7 | 1 year ago |
|
dd733d9367 | 1 year ago |
|
8921ed3cfa | 1 year ago |
|
ce4d2d84b2 | 1 year ago |
@ -1,200 +0,0 @@
|
||||
package com.zj365.dc.activity
|
||||
|
||||
import android.content.Intent
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.util.Log
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.luck.picture.lib.PictureSelector
|
||||
import com.luck.picture.lib.config.PictureConfig
|
||||
import com.tamsiree.rxkit.RxActivityTool
|
||||
import com.tamsiree.rxkit.RxKeyboardTool
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.common.TimeSelect
|
||||
import com.xty.common.TimeUtils
|
||||
import com.xty.common.arouter.ARouterUrl
|
||||
import com.xty.common.arouter.RouteManager
|
||||
import com.xty.common.event.MyInfoEvent
|
||||
import com.xty.common.picture.PictureUtils
|
||||
import com.xty.common.setImage
|
||||
import com.xty.common.util.CommonToastUtils
|
||||
import com.zj365.dc.R
|
||||
import com.zj365.dc.databinding.ActInfoSimpleBinding
|
||||
import com.zj365.dc.vm.InfoSimpleVm
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import java.util.regex.Pattern
|
||||
|
||||
/**
|
||||
* 基本信息
|
||||
* 简单信息填写
|
||||
*/
|
||||
@Route(path = ARouterUrl.INFO_SIMPLE)
|
||||
class InfoSimpleAct : BaseVmAct<InfoSimpleVm>() {
|
||||
|
||||
val binding by lazy { ActInfoSimpleBinding.inflate(layoutInflater) }
|
||||
override fun setLayout() = binding.root
|
||||
|
||||
private var isBinding: Boolean = false
|
||||
private var sexType = 1
|
||||
private var birthdayType = 1
|
||||
|
||||
var phone: String = ""
|
||||
private var pwd: String = ""
|
||||
|
||||
private val timeSelect by lazy { TimeSelect(this) {} }
|
||||
private val textListener by lazy {
|
||||
object : TextWatcher {
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
binding.mName.removeTextChangedListener(this)
|
||||
val str = s.toString().trim()
|
||||
if (str.isNotEmpty()) {
|
||||
val isNum = Pattern.matches("[0-9]", str.substring(0, 1))
|
||||
if (isNum) {
|
||||
if (str.length > 2) {
|
||||
binding.mName.setText(str.substring(1, str.length))
|
||||
} else {
|
||||
binding.mName.setText("")
|
||||
}
|
||||
CommonToastUtils.showToast(R.string.name_first_num)
|
||||
}
|
||||
}
|
||||
binding.mName.addTextChangedListener(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
isDarkBar = true
|
||||
phone = intent.getStringExtra("phone").toString()
|
||||
pwd = intent.getStringExtra("password").toString()
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text = getString(R.string.base_info)
|
||||
binding.title.mIvBack.setOnClickListener { finish() }
|
||||
binding.mImage.setOnClickListener { PictureUtils.openCamera(this) }
|
||||
timeSelect.startDate.set(1922, 0, 1)
|
||||
binding.llBirthday.setOnClickListener {
|
||||
RxKeyboardTool.hideSoftInput(this)
|
||||
timeSelect.selectTime(binding.mBirthday)
|
||||
}
|
||||
sexType = if (binding.checkSex.isChecked) 2 else 1
|
||||
birthdayType = if (binding.checkBirthday.isChecked) 2 else 1
|
||||
binding.bindingTv.setOnClickListener {
|
||||
isBinding = true
|
||||
turnToSaveBaseData()
|
||||
|
||||
|
||||
}
|
||||
binding.mName.addTextChangedListener(textListener)
|
||||
|
||||
binding.mSubmit.setOnClickListener {
|
||||
isBinding = false
|
||||
turnToSaveBaseData()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用接口保存
|
||||
*/
|
||||
private fun turnToSaveBaseData() {
|
||||
|
||||
val birthDay = binding.mBirthday.text.toString().trim()
|
||||
val name = binding.mName.text.toString().trim()
|
||||
if (TimeUtils.getAgeByBirth(birthDay) < 14) {
|
||||
CommonToastUtils.showToast("需要年满14岁才可使用")
|
||||
isBinding = false
|
||||
return
|
||||
}
|
||||
val avatar = binding.mImage.tag
|
||||
val datanal = avatar?.toString() ?: ""
|
||||
val sexValue = if (binding.checkSex.isChecked) "2" else "1"
|
||||
birthdayType = if (binding.checkBirthday.isChecked) 2 else 1
|
||||
//调用接口
|
||||
if (name.trim().isEmpty()) {
|
||||
mViewModel.submit(datanal, null, sexValue, birthdayType.toString(), birthDay)
|
||||
} else {
|
||||
mViewModel.submit(datanal, name, sexValue, birthdayType.toString(), birthDay)
|
||||
}
|
||||
}
|
||||
|
||||
override fun liveObserver() {
|
||||
mViewModel.setBasic.observe(this) {
|
||||
|
||||
//不管点击绑定还是完成都会去登录
|
||||
EventBus.getDefault().post(MyInfoEvent())
|
||||
mViewModel.login(phone, pwd)
|
||||
|
||||
if (isBinding) {
|
||||
return@observe
|
||||
}
|
||||
CommonToastUtils.showSucceedToast("信息设置成功")
|
||||
}
|
||||
|
||||
mViewModel.mLogin.observe(this) {
|
||||
//登录成功请求用户token
|
||||
mViewModel.getImUserSig("user_${it.data.id}")
|
||||
}
|
||||
|
||||
mViewModel.getImUserSig.observe(this) {
|
||||
Log.e("simon", "login" + it.data)
|
||||
/*TUILogin.login(
|
||||
applicationContext,
|
||||
0,
|
||||
it.paramsData,
|
||||
it.data,
|
||||
object : TUICallback() {
|
||||
override fun onSuccess() {
|
||||
Log.e("simon", "onSuccess")
|
||||
if (!isBinding) { //如果是直接点击完成,跳转到主页面
|
||||
ARouter.getInstance().build(ARouterUrl.MAIN_ACT).navigation()
|
||||
RxActivityTool.finishAllActivity()
|
||||
} else { //如果是去绑定设备,跳转到设备选择界面,同是给予标记,告诉该界面已经登录
|
||||
bundle.clear()
|
||||
bundle.putBoolean("isLogin", true)
|
||||
RouteManager.goAct(ARouterUrl.DEVICE_CHOICE, bundle)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(errorCode: Int, errorMessage: String?) {
|
||||
Log.e("simon", "onError")
|
||||
}
|
||||
})*/
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
|
||||
if (resultCode === RESULT_OK) {
|
||||
when (requestCode) {
|
||||
PictureConfig.CHOOSE_REQUEST -> {
|
||||
var result = PictureSelector.obtainMultipleResult(data)
|
||||
if (result.size > 0) {
|
||||
var path = if (result[0].compressPath.isEmpty()) {
|
||||
result[0].androidQToPath
|
||||
} else {
|
||||
result[0].compressPath
|
||||
}
|
||||
binding.mImage.setImage(this, path)
|
||||
binding.mImage.tag = path
|
||||
}
|
||||
}
|
||||
|
||||
1000 -> {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,227 @@
|
||||
package com.zj365.dc.activity.shop
|
||||
|
||||
import android.text.TextUtils
|
||||
import android.view.KeyEvent
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.tamsiree.rxkit.RxKeyboardTool
|
||||
import com.xty.base.act.BaseListAct
|
||||
import com.xty.base.act.BaseVmAct
|
||||
import com.xty.common.Const
|
||||
import com.xty.common.R
|
||||
import com.xty.common.UmengEventId
|
||||
import com.xty.common.arouter.ARouterUrl
|
||||
import com.xty.common.arouter.RouteManager
|
||||
import com.xty.common.onEventObject
|
||||
import com.xty.common.util.CommonToastUtils
|
||||
import com.xty.network.model.GoodsRecordsBean
|
||||
import com.xty.network.model.ShopCategoryBean
|
||||
import com.zj365.dc.BuildConfig
|
||||
import com.zj365.dc.adapter.shop.ShopCategoryAdapter
|
||||
import com.zj365.dc.adapter.shop.ShopChildCategoryAdapter
|
||||
import com.zj365.dc.adapter.shop.ShopGoodsTwoAdapter
|
||||
import com.zj365.dc.databinding.ActShopCategoryBinding
|
||||
import com.zj365.dc.vm.ShopMallVm
|
||||
import okhttp3.internal.notify
|
||||
import java.util.ArrayList
|
||||
|
||||
@Route(path = ARouterUrl.SHOP_CATEGORY)
|
||||
class ShopCategoryActivity : BaseVmAct<ShopMallVm>() {
|
||||
|
||||
val binding by lazy { ActShopCategoryBinding.inflate(layoutInflater) }
|
||||
|
||||
val mCategoryAdapter by lazy { ShopCategoryAdapter() }
|
||||
|
||||
val mGoodsAdapter by lazy { ShopGoodsTwoAdapter() }
|
||||
|
||||
val mChildCategoryAdapter by lazy { ShopChildCategoryAdapter() }
|
||||
|
||||
var goodsName:String? = null
|
||||
|
||||
var categoryId:Long = 0L
|
||||
var mCategoryList = ArrayList<ShopCategoryBean>()
|
||||
var parentId:Long = 0L
|
||||
|
||||
var index = 0
|
||||
var page:Int = 1
|
||||
|
||||
fun initAdapter() {
|
||||
|
||||
|
||||
|
||||
binding.recyclerView.adapter = mGoodsAdapter
|
||||
binding.recyclerView.layoutManager = LinearLayoutManager(this@ShopCategoryActivity)
|
||||
|
||||
binding.childRecyclerView.adapter = mChildCategoryAdapter
|
||||
binding.childRecyclerView.layoutManager = LinearLayoutManager(this@ShopCategoryActivity)
|
||||
|
||||
mChildCategoryAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
var bean = adapter.data[position] as ShopCategoryBean
|
||||
(adapter.data as ArrayList<ShopCategoryBean>).forEach {
|
||||
it.isChecked = false
|
||||
|
||||
}
|
||||
bean.isChecked = true
|
||||
categoryId = bean.id
|
||||
onEventObject(baseContext, UmengEventId.GOODS_CATEGORY,"id:${bean.id}")
|
||||
mViewModel.getGoodsList(goodsName,categoryId,0,page)
|
||||
mChildCategoryAdapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
binding.mRefresh.setOnRefreshListener {
|
||||
page = 1
|
||||
loadData()
|
||||
binding.mRefresh.finishRefresh(1000)
|
||||
}
|
||||
binding.mRefresh.setEnableLoadMore(true)
|
||||
binding.mRefresh.setOnLoadMoreListener {
|
||||
page++
|
||||
loadData()
|
||||
binding.mRefresh.finishLoadMore(1000)
|
||||
}
|
||||
|
||||
mGoodsAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
var bean = adapter.data[position] as GoodsRecordsBean.GoodsBean
|
||||
onEventObject(baseContext, UmengEventId.GOODS_DETAIL,"id:${bean.id}")
|
||||
bundle.clear()
|
||||
bundle.putString(
|
||||
"web_site_url",
|
||||
"${BuildConfig.h5url}pages/index/index?pageId=commodityDetail&id=${bean.id}"
|
||||
)
|
||||
bundle.putBoolean("isShowTitle",false)
|
||||
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun loadData(){
|
||||
mViewModel.getGoodsList(goodsName,categoryId,0,page)
|
||||
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
statusBar(binding.title.mView)
|
||||
binding.title.mTvTitle.text ="商品分类"
|
||||
binding.title.mIvBack.setOnClickListener {
|
||||
finish()
|
||||
}
|
||||
categoryId = intent.getLongExtra("id",0)
|
||||
parentId = categoryId
|
||||
|
||||
mCategoryList = intent.getParcelableArrayListExtra<ShopCategoryBean>("categoryList")!!
|
||||
initAdapter()
|
||||
mCategoryList.forEachIndexed { index, shopCategoryBean ->
|
||||
if (shopCategoryBean.id == categoryId){
|
||||
this.index = index
|
||||
shopCategoryBean.isChecked = true
|
||||
}
|
||||
}
|
||||
|
||||
binding.categoryRecyclerView.adapter = mCategoryAdapter
|
||||
|
||||
if(mCategoryList.size != 8){
|
||||
binding.categoryRecyclerView.layoutManager = LinearLayoutManager(this,LinearLayoutManager.HORIZONTAL,false)
|
||||
}else if(mCategoryList.size == 8){
|
||||
binding.categoryRecyclerView.layoutManager = GridLayoutManager(this,4)
|
||||
}
|
||||
mCategoryAdapter.setNewInstance(mCategoryList)
|
||||
binding.categoryRecyclerView.scrollToPosition(index)
|
||||
|
||||
mCategoryAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
var bean = adapter.data[position] as ShopCategoryBean
|
||||
(adapter.data as ArrayList<ShopCategoryBean>).forEach {
|
||||
it.isChecked = false
|
||||
|
||||
}
|
||||
bean.isChecked = true
|
||||
parentId = bean.id
|
||||
onEventObject(baseContext, UmengEventId.GOODS_CATEGORY,"id:${bean.id}")
|
||||
mViewModel.getGoodsCategory(bean.id)
|
||||
mCategoryAdapter.notifyDataSetChanged()
|
||||
}
|
||||
mViewModel.getGoodsCategory(categoryId)
|
||||
|
||||
binding.etSearch.setOnEditorActionListener(object : TextView.OnEditorActionListener {
|
||||
override fun onEditorAction(p0: TextView?, p1: Int, p2: KeyEvent?): Boolean {
|
||||
if(p1 == EditorInfo.IME_ACTION_SEARCH){
|
||||
goodsName = binding.etSearch.text.toString().trim()
|
||||
/* if(TextUtils.isEmpty(goodsName)){
|
||||
CommonToastUtils.showToast("请输入搜索内容")
|
||||
return true
|
||||
}*/
|
||||
page = 1
|
||||
mViewModel.getGoodsList(goodsName,categoryId,0,page)
|
||||
//mViewModel.getGoodsList(goodsName,0L,0,page)
|
||||
|
||||
RxKeyboardTool.hideSoftInput(this@ShopCategoryActivity)
|
||||
return true
|
||||
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
override fun liveObserver() {
|
||||
mViewModel.categoryLiveDate.observe(this){
|
||||
it.data.add(0,ShopCategoryBean(parentId,parentId,"全部",0,null,true))
|
||||
it.data.forEachIndexed { index, shopCategoryBean ->
|
||||
|
||||
if (shopCategoryBean.isChecked){
|
||||
categoryId = shopCategoryBean.id
|
||||
mViewModel.getGoodsList(goodsName,shopCategoryBean.id,0,page)
|
||||
|
||||
}
|
||||
}
|
||||
mChildCategoryAdapter.setNewInstance(it.data)
|
||||
}
|
||||
|
||||
|
||||
mViewModel.goodsLiveData.observe(this){
|
||||
|
||||
if (page == 1) {
|
||||
if (it.data.records.isNullOrEmpty()) {
|
||||
mGoodsAdapter.setNewInstance(null)
|
||||
mGoodsAdapter.setEmptyView(getNoneView())
|
||||
binding.mRefresh?.setEnableLoadMore(false)
|
||||
} else {
|
||||
if (it.data.records.size < Const.PAGE_SIZE) {
|
||||
binding.mRefresh?.setEnableLoadMore(false)
|
||||
} else {
|
||||
binding.mRefresh?.setEnableLoadMore(true)
|
||||
++page
|
||||
}
|
||||
mGoodsAdapter.setNewInstance(it.data.records)
|
||||
}
|
||||
} else {
|
||||
if (it.data.records.isNullOrEmpty()) {
|
||||
binding.mRefresh?.setEnableLoadMore(false)
|
||||
}else{
|
||||
if (it.data.records.size < Const.PAGE_SIZE) {
|
||||
binding.mRefresh?.setEnableLoadMore(false)
|
||||
}else{
|
||||
++page
|
||||
}
|
||||
mGoodsAdapter.addData(it.data.records)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun getNoneView() =
|
||||
LayoutInflater.from(this).inflate(R.layout.view_none_data, binding.recyclerView, false)
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.zj365.dc.adapter.shop
|
||||
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.ruffian.library.widget.RImageView
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.xty.common.setImage
|
||||
import com.xty.network.model.ShopCategoryBean
|
||||
import com.zj365.dc.R
|
||||
import de.hdodenhof.circleimageview.CircleImageView
|
||||
|
||||
class ShopCategoryAdapter : BaseAdapter<ShopCategoryBean>(R.layout.item_shop_categroy) {
|
||||
override fun convert(holder: BaseViewHolder, item: ShopCategoryBean) {
|
||||
|
||||
// if (data.size == 8){
|
||||
var screenWidth = context.resources.displayMetrics.widthPixels
|
||||
val layoutParam = holder.getView<LinearLayout>(R.id.root).layoutParams
|
||||
layoutParam.width = screenWidth /4
|
||||
holder.getView<LinearLayout>(R.id.root).layoutParams = layoutParam
|
||||
// }
|
||||
|
||||
var img = holder.getView<RImageView>(R.id.img_category)
|
||||
var categoryName = holder.getView<TextView>(R.id.tv_category)
|
||||
if (item.isChecked){
|
||||
img.borderColor = context.getColor(R.color.col_02c)
|
||||
categoryName.setTextColor(context.getColor(R.color.col_02c))
|
||||
}else{
|
||||
img.borderColor = context.getColor(R.color.white)
|
||||
categoryName.setTextColor(context.getColor(R.color.col_313))
|
||||
|
||||
}
|
||||
img.setImage(context,item.pic)
|
||||
/*if (item.pic == null){
|
||||
|
||||
}else{
|
||||
item.pic?.let {
|
||||
img.setImage(context,it)
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
holder.setText(R.id.tv_category,item.categoryName)
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.zj365.dc.adapter.shop
|
||||
|
||||
import android.graphics.Color
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.xty.network.model.ShopCategoryBean
|
||||
import com.zj365.dc.R
|
||||
|
||||
class ShopChildCategoryAdapter : BaseAdapter<ShopCategoryBean>(R.layout.item_category_child) {
|
||||
override fun convert(holder: BaseViewHolder, item: ShopCategoryBean) {
|
||||
holder.setText(R.id.tv_child_category,item.categoryName)
|
||||
if (item.isChecked){
|
||||
holder.setTextColor(R.id.tv_child_category,context.getColor(R.color.col_02c))
|
||||
holder.setBackgroundColor(R.id.tv_child_category, Color.parseColor("#2102C191"))
|
||||
}else{
|
||||
holder.setTextColor(R.id.tv_child_category,context.getColor(R.color.col_313))
|
||||
holder.setBackgroundColor(R.id.tv_child_category,context.getColor(R.color.white))
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.zj365.dc.adapter.shop
|
||||
|
||||
import android.widget.TextView
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.ruffian.library.widget.RImageView
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.xty.common.setImage
|
||||
import com.xty.common.util.SpannableUtils
|
||||
import com.xty.network.model.GoodsRecordsBean
|
||||
import com.zj365.dc.R
|
||||
import org.w3c.dom.Text
|
||||
|
||||
class ShopGoodsAdapter : BaseAdapter<GoodsRecordsBean.GoodsBean>(R.layout.item_shop_list) {
|
||||
override fun convert(holder: BaseViewHolder, item: GoodsRecordsBean.GoodsBean) {
|
||||
holder.getView<RImageView>(R.id.img_goods).setImage(context,item.pic)
|
||||
holder.setText(R.id.tv_goods_name,item.prodName)
|
||||
holder.setText(R.id.tv_price,"¥ ${item.price}")
|
||||
SpannableUtils.setMoney(holder.getView<TextView>(R.id.tv_line_price),item.oriPrice)
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.zj365.dc.adapter.shop
|
||||
|
||||
import android.widget.TextView
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.ruffian.library.widget.RImageView
|
||||
import com.xty.base.adapter.BaseAdapter
|
||||
import com.xty.common.setImage
|
||||
import com.xty.common.util.SpannableUtils
|
||||
import com.xty.network.model.GoodsRecordsBean
|
||||
import com.zj365.dc.R
|
||||
|
||||
class ShopGoodsTwoAdapter : BaseAdapter<GoodsRecordsBean.GoodsBean>(R.layout.item_goods_list_two_style) {
|
||||
override fun convert(holder: BaseViewHolder, item: GoodsRecordsBean.GoodsBean) {
|
||||
holder.getView<RImageView>(R.id.img_goods).setImage(context,item.pic)
|
||||
holder.setText(R.id.tv_goods_name,item.prodName)
|
||||
holder.setText(R.id.tv_price,"¥ ${item.price}")
|
||||
SpannableUtils.setMoney(holder.getView<TextView>(R.id.tv_line_price),item.oriPrice)
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package com.zj365.dc.fragment
|
||||
|
||||
import android.graphics.Rect
|
||||
import android.os.Parcelable
|
||||
import android.text.TextUtils
|
||||
import android.view.KeyEvent
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.StaggeredGridLayoutManager
|
||||
import com.tamsiree.rxkit.RxKeyboardTool
|
||||
import com.xty.base.fragment.BaseFragList
|
||||
import com.xty.base.fragment.BaseVmFrag
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.common.UmengEventId
|
||||
import com.xty.common.arouter.ARouterUrl
|
||||
import com.xty.common.arouter.RouteManager
|
||||
import com.xty.common.onEventObject
|
||||
import com.xty.common.util.CommonToastUtils
|
||||
import com.xty.common.weight.ExpandStaggeredManager
|
||||
import com.xty.network.model.GoodsRecordsBean
|
||||
import com.xty.network.model.ShopCategoryBean
|
||||
import com.zj365.dc.BuildConfig
|
||||
import com.zj365.dc.adapter.shop.ShopCategoryAdapter
|
||||
import com.zj365.dc.adapter.shop.ShopGoodsAdapter
|
||||
import com.zj365.dc.databinding.FragShopBinding
|
||||
import com.zj365.dc.vm.ShopMallVm
|
||||
import java.util.ArrayList
|
||||
|
||||
class ShopFragment: BaseFragList<ShopMallVm>() {
|
||||
val binding by lazy { FragShopBinding.inflate(layoutInflater) }
|
||||
|
||||
val mCategoryAdapter by lazy { ShopCategoryAdapter() }
|
||||
|
||||
val mGoodsAdapter by lazy { ShopGoodsAdapter() }
|
||||
|
||||
|
||||
var goodsName:String? = null
|
||||
|
||||
override fun initAdapter() {
|
||||
binding.recyclerView.adapter = mGoodsAdapter
|
||||
binding.recyclerView.layoutManager = ExpandStaggeredManager(2,
|
||||
StaggeredGridLayoutManager.VERTICAL)
|
||||
|
||||
binding.categoryRecyclerView.adapter = mCategoryAdapter
|
||||
|
||||
mCategoryAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
var bean = adapter.data[position] as ShopCategoryBean
|
||||
onEventObject(requireContext(), UmengEventId.GOODS_CATEGORY,"id:${bean.id}")
|
||||
bundle.clear()
|
||||
bundle.putLong("id",bean.id)
|
||||
bundle.putParcelableArrayList("categoryList",adapter.data as ArrayList<ShopCategoryBean>)
|
||||
RouteManager.goAct(ARouterUrl.SHOP_CATEGORY,bundle)
|
||||
}
|
||||
|
||||
setRecycleRefresh(binding.recyclerView,binding.mRefresh,true)
|
||||
|
||||
mGoodsAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
var bean = adapter.data[position] as GoodsRecordsBean.GoodsBean
|
||||
onEventObject(requireContext(), UmengEventId.GOODS_DETAIL,"id:${bean.id}")
|
||||
bundle.clear()
|
||||
bundle.putString(
|
||||
"web_site_url",
|
||||
"${BuildConfig.h5url}pages/index/index?pageId=commodityDetail&id=${bean.id}"
|
||||
)
|
||||
RouteManager.goAct(ARouterUrl.H5_ACT, bundle)
|
||||
}
|
||||
}
|
||||
|
||||
override fun refresh() {
|
||||
mViewModel.getGoodsList(null,0L,0,page)
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mViewModel.getGoodsCategory(0L)
|
||||
// mViewModel.getGoodsList(null,0L,0,page)
|
||||
|
||||
binding.etSearch.setOnEditorActionListener(object : TextView.OnEditorActionListener {
|
||||
override fun onEditorAction(p0: TextView?, p1: Int, p2: KeyEvent?): Boolean {
|
||||
if(p1 == EditorInfo.IME_ACTION_SEARCH){
|
||||
goodsName = binding.etSearch.text.toString().trim()
|
||||
/*if(TextUtils.isEmpty(goodsName)){
|
||||
CommonToastUtils.showToast("请输入搜索内容")
|
||||
return true
|
||||
}*/
|
||||
page = 1
|
||||
mViewModel.getGoodsList(goodsName,0L,0,page)
|
||||
|
||||
RxKeyboardTool.hideSoftInput(requireActivity())
|
||||
return true
|
||||
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
binding.recyclerView.addItemDecoration(object : RecyclerView.ItemDecoration() {
|
||||
override fun getItemOffsets(outRect: Rect, itemPosition: Int, parent: RecyclerView) {
|
||||
super.getItemOffsets(outRect, itemPosition, parent)
|
||||
outRect.bottom = 12
|
||||
outRect.left = 7
|
||||
outRect.right = 7
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun setViewModel()= ShopMallVm()
|
||||
override fun observer() {
|
||||
mViewModel.categoryLiveDate.observe(this){
|
||||
if(it.data.size != 8){
|
||||
binding.categoryRecyclerView.layoutManager = LinearLayoutManager(requireContext(),LinearLayoutManager.HORIZONTAL,false)
|
||||
}else if(it.data.size == 8){
|
||||
binding.categoryRecyclerView.layoutManager = GridLayoutManager(requireContext(),4)
|
||||
|
||||
}
|
||||
|
||||
mCategoryAdapter.setNewInstance(it.data)
|
||||
}
|
||||
|
||||
mViewModel.goodsLiveData.observe(this){
|
||||
if(page == 1){
|
||||
mGoodsAdapter.setNewInstance(it.data.records)
|
||||
|
||||
}else{
|
||||
mGoodsAdapter.addData(it.data.records)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun setLayout() = binding.root
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
package com.zj365.dc.vm
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.tamsiree.rxkit.RxTool
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.common.Const
|
||||
import com.xty.common.MMkvHelper
|
||||
import com.xty.common.util.CommonToastUtils
|
||||
import com.xty.network.model.ImageUploadBean
|
||||
import com.xty.network.model.MainBean
|
||||
import com.xty.network.model.NotAccepted
|
||||
import com.xty.network.model.RespBody
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.withContext
|
||||
import okhttp3.Headers
|
||||
import okhttp3.MultipartBody
|
||||
import org.json.JSONObject
|
||||
import java.io.File
|
||||
|
||||
class InfoSimpleVm : BaseVm() {
|
||||
|
||||
val setBasic by lazy { MutableLiveData<RespBody<NotAccepted>>() }
|
||||
val mLogin by lazy { MutableLiveData<RespBody<MainBean.User>>() }
|
||||
val getImUserSig by lazy { MutableLiveData<RespBody<String>>() }
|
||||
|
||||
fun login(account: String, pwd: String) {
|
||||
startHttp {
|
||||
val json = JSONObject()
|
||||
json.put("phone", account)
|
||||
json.put("userPwd", RxTool.Md5(pwd))
|
||||
//json.put("userPwd", pwd)
|
||||
val login = apiInterface().login(retrofits.getRequestBody(json.toString()))
|
||||
if (login.body()?.code == 500) {
|
||||
login.body()?.msg?.let { CommonToastUtils.showToast(it) }
|
||||
return@startHttp
|
||||
}
|
||||
saveToken(login.raw().headers)
|
||||
val bodys = login.body() as RespBody
|
||||
|
||||
MMkvHelper.put(Const.USER_ID, bodys.data.id)
|
||||
bodys.getCodeStatus(mLogin, nowData, loading)
|
||||
}
|
||||
}
|
||||
|
||||
private fun saveToken(headers: Headers) {
|
||||
val headerIterator = headers.iterator()
|
||||
while (headerIterator.hasNext()) {
|
||||
val next = headerIterator.next()
|
||||
if (Const.Auth_Token == next.first) MMkvHelper.put(Const.Auth_Token, next.second)
|
||||
|
||||
if (Const.Auth_Id == next.first) MMkvHelper.put(Const.Auth_Id, next.second)
|
||||
}
|
||||
}
|
||||
|
||||
fun getImUserSig(identifier: String) {
|
||||
startHttp {
|
||||
val imUserSig = apiInterface().getImUserSig(identifier)
|
||||
imUserSig.body()?.getCodeStatus(getImUserSig, nowData, paramsData = identifier)
|
||||
}
|
||||
}
|
||||
|
||||
fun submit(path: String, name: String?, sex: String, birthDaytype: String, birthDay: String) {
|
||||
startHttp {
|
||||
withContext(Dispatchers.IO) {
|
||||
var fileId = ""
|
||||
if (path.isNullOrEmpty()) {
|
||||
|
||||
} else {
|
||||
val image = async { uploadImage(path) }
|
||||
val await = image.await()
|
||||
fileId = await.fileId
|
||||
}
|
||||
val upload = async { uploadInfo(name, sex, fileId, birthDaytype, birthDay) }
|
||||
val await = upload.await() //个人信息上传
|
||||
if (await.code != 0) {
|
||||
CommonToastUtils.showToast(await.msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun uploadInfo(
|
||||
name: String?,
|
||||
sex: String,
|
||||
fileId: String = "",
|
||||
birthdayType: String,
|
||||
birthDay: String
|
||||
): RespBody<NotAccepted> {
|
||||
val json = JSONObject()
|
||||
json.put("name", name)
|
||||
json.put("sex", sex)
|
||||
if (sex == "1") {
|
||||
json.put("height", "170")
|
||||
json.put("weight", "65")
|
||||
} else {
|
||||
json.put("height", "160")
|
||||
json.put("weight", "49")
|
||||
}
|
||||
|
||||
json.put("birthday", birthDay)
|
||||
json.put("birthdayType", birthdayType)
|
||||
|
||||
if (!fileId.isNullOrEmpty()) {
|
||||
json.put("avatarUrl", fileId)
|
||||
}
|
||||
val rb = retrofits.getRequestBody(json.toString())
|
||||
val body = apiInterface().setUpdateUser(rb)
|
||||
body.getCodeStatus(setBasic, nowData)
|
||||
return body
|
||||
}
|
||||
|
||||
private suspend fun uploadImage(path: String): ImageUploadBean {
|
||||
val f = File(path)
|
||||
val fileRb = MultipartBody.Part.createFormData(
|
||||
"file",
|
||||
f.name,
|
||||
retrofits.getMultiPartFileRb(f)
|
||||
)
|
||||
val body = apiInterface().uploadImage(fileRb)
|
||||
return body.data
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.zj365.dc.vm
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.alibaba.fastjson.JSONObject
|
||||
import com.xty.base.vm.BaseVm
|
||||
import com.xty.network.model.ChooseAddressBean
|
||||
import com.xty.network.model.ComputeAmountBean
|
||||
import com.xty.network.model.GoodsRecordsBean
|
||||
import com.xty.network.model.RespBody
|
||||
import com.xty.network.model.ShopCategoryBean
|
||||
import com.xty.network.model.ShopGoodsOrderBean
|
||||
|
||||
class ShopMallVm : BaseVm() {
|
||||
|
||||
val categoryLiveDate by lazy { MutableLiveData<RespBody<MutableList<ShopCategoryBean>>>() }
|
||||
|
||||
val goodsLiveData by lazy { MutableLiveData<RespBody<GoodsRecordsBean>>() }
|
||||
|
||||
val createOrderLiveData by lazy { MutableLiveData<RespBody<ShopGoodsOrderBean>>() }
|
||||
|
||||
val defaultAddressLiveData by lazy { MutableLiveData<RespBody<ChooseAddressBean>>() }
|
||||
|
||||
val hasCouponLiveData by lazy { MutableLiveData<RespBody<Int>> ()}
|
||||
|
||||
val computeAmountLiveData by lazy { MutableLiveData<RespBody<ComputeAmountBean>>() }
|
||||
|
||||
fun getGoodsCategory(parentId:Long){
|
||||
startHttp {
|
||||
var code = apiInterface().getGoodsCategory(parentId)
|
||||
code.getCodeStatus(categoryLiveDate, nowData)
|
||||
}
|
||||
}
|
||||
|
||||
fun getGoodsList(prodName:String?,categoryId:Long,isRec:Int,pageSize:Int){
|
||||
startHttp {
|
||||
var json = JSONObject()
|
||||
prodName?.let {
|
||||
json.put("prodName",it)
|
||||
}
|
||||
json.put("categoryId",categoryId)
|
||||
json.put("isRec",isRec)
|
||||
json.put("pageSize",10)
|
||||
json.put("pageNum",pageSize)
|
||||
var code = apiInterface().getGoodsList(retrofits.getRequestBody(json.toString()))
|
||||
code.getCodeStatus(goodsLiveData, nowData)
|
||||
}
|
||||
}
|
||||
|
||||
fun createOrder(skuId:String,num:Int,addrId:Long?,couponsId:Long?){
|
||||
startHttp {
|
||||
var json = JSONObject()
|
||||
|
||||
json.put("skuId",skuId)
|
||||
json.put("num",num)
|
||||
addrId?.let {
|
||||
json.put("addrId",it)
|
||||
}
|
||||
couponsId?.let {
|
||||
json.put("couponsId",it)
|
||||
|
||||
}
|
||||
var code = apiInterface().createOrder(retrofits.getRequestBody(json.toString()))
|
||||
code.getCodeStatus(createOrderLiveData, nowData)
|
||||
}
|
||||
}
|
||||
|
||||
fun getDefaultAddress(){
|
||||
startHttp(false) {
|
||||
var code = apiInterface().getDefaultAddress()
|
||||
code.getCodeStatus(defaultAddressLiveData, nowData)
|
||||
}
|
||||
}
|
||||
|
||||
fun hasCoupon(){
|
||||
startHttp(false) {
|
||||
var code = apiInterface().hasCoupons()
|
||||
code.getCodeStatus(hasCouponLiveData, nowData)
|
||||
}
|
||||
}
|
||||
|
||||
fun computeAmount(skuId:Long,num:Int,couponsId:Long?){
|
||||
startHttp {
|
||||
var json = JSONObject()
|
||||
json.put("skuId",skuId)
|
||||
json.put("num",num)
|
||||
json.put("couponsId",couponsId)
|
||||
var code = apiInterface().computeAmount(retrofits.getRequestBody(json.toString()))
|
||||
code.getCodeStatus(computeAmountLiveData,nowData)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,291 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/title"
|
||||
layout="@layout/title_white_bar" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/title"
|
||||
android:background="@color/white"
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_6">
|
||||
<TextView
|
||||
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_12"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
android:singleLine="true"
|
||||
android:text="@string/head_portrait"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
|
||||
<de.hdodenhof.circleimageview.CircleImageView
|
||||
android:id="@+id/mImage"
|
||||
android:layout_width="@dimen/dp_46"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:layout_toLeftOf="@+id/right_im"
|
||||
android:src="@mipmap/ic_default_man" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right_im"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="@dimen/dp_3"
|
||||
android:src="@mipmap/arrow_right"/>
|
||||
|
||||
</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:id="@+id/mRelName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="@dimen/dp_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/m1"
|
||||
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/name"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
|
||||
|
||||
<EditText
|
||||
|
||||
android:id="@+id/mName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/m1"
|
||||
android:background="@null"
|
||||
android:gravity="center|right"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_16"
|
||||
tools:text="旅行者2号" />
|
||||
</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" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingRight="@dimen/dp_10">
|
||||
|
||||
|
||||
<com.xty.common.weight.RequiredTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_weight="2"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
android:singleLine="true"
|
||||
android:text="@string/sex"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_sex"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:background="@drawable/selector_check_sex_new"
|
||||
android:button="@null"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<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" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="@dimen/dp_12"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.xty.common.weight.RequiredTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:background="@null"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:text="@string/birthday_type"
|
||||
android:textColor="@color/col_455"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/check_birthday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:background="@drawable/selector_check_birthday"
|
||||
android:button="@null"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<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" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_birthday"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.xty.common.weight.RequiredTextView
|
||||
android:id="@+id/mBirthday_date"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:paddingLeft="@dimen/dp_10"
|
||||
android:text="@string/birthday"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:textColor="@color/col_455"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
android:singleLine="true"
|
||||
android:textSize="@dimen/dp_14" />
|
||||
<TextView
|
||||
android:id="@+id/mBirthday"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:hint=" 请选择生日 "
|
||||
tools:text="2023-02-03"
|
||||
android:textColorHint="@color/col_7b8"
|
||||
android:textColor="@color/col_313"
|
||||
android:drawableRight="@mipmap/arrow_right"/>
|
||||
</LinearLayout>
|
||||
<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" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:text="请完善以上基本信息,以便于更好的为您提供健管的服务"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:gravity="bottom"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:id="@+id/bindingTv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:paddingBottom="@dimen/dp_8"
|
||||
android:paddingRight="@dimen/dp_20"
|
||||
android:paddingLeft="@dimen/dp_20"
|
||||
android:background="@drawable/shape_btn_select_bg_white"
|
||||
android:textColor="@color/col_02c"
|
||||
android:textSize="@dimen/dp_16"
|
||||
android:text="去绑定手表"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mSubmit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="@dimen/dp_8"
|
||||
android:paddingBottom="@dimen/dp_8"
|
||||
android:layout_marginLeft="@dimen/dp_20"
|
||||
android:autoSizeMaxTextSize="@dimen/dp_20"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:background="@drawable/shape_btn_select_bg"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="完成"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_16" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,100 @@
|
||||
<?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"
|
||||
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_12"
|
||||
app:corner_radius="@dimen/dp_18"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@color/white"
|
||||
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"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入商品名称"
|
||||
android:layout_toRightOf="@+id/img_search"
|
||||
android:layout_centerVertical="true"
|
||||
android:textColor="@color/col_313"
|
||||
android:background="@null"
|
||||
android:textColorHint="@color/col_7c7"
|
||||
android:imeOptions="actionSearch"
|
||||
android:singleLine="true"
|
||||
android:inputType="text"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:layout_marginLeft="@dimen/dp_7"/>
|
||||
|
||||
</com.ruffian.library.widget.RRelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:background="@color/white"
|
||||
android:layout_marginBottom="@dimen/dp_19"
|
||||
android:id="@+id/category_recyclerView"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:background="@color/col_6f7">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/child_recyclerView"
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"/>
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_marginLeft="@dimen/dp_9"
|
||||
android:layout_marginRight="@dimen/dp_13"
|
||||
app:srlAccentColor="@color/white">
|
||||
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foregroundTint="@color/white"
|
||||
app:srlAccentColor="@color/black"
|
||||
app:srlPrimaryColor="@color/white" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/recyclerView"/>
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -1,836 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/dp_14"
|
||||
android:paddingRight="@dimen/dp_14">
|
||||
|
||||
<!-- 健康管理 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/llmanage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_white_8radius"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_23"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvManage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:text="@string/health_manage"
|
||||
android:textColor="#313131"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_15"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/llmanage">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_health_manage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"/>
|
||||
|
||||
<com.zj365.dc.weight.HIndicator
|
||||
android:id="@+id/hi_indicator"
|
||||
android:layout_width="@dimen/dp_26"
|
||||
android:layout_height="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:visibility="gone"
|
||||
app:hi_bgColor="@color/col_298D0"
|
||||
app:hi_indicatorColor="@color/col_8D0" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llguide"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_white_8radius"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_23"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<!-- 健康指导 -->
|
||||
<TextView
|
||||
android:id="@+id/mTvGuid"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:text="@string/health_guid"
|
||||
android:textColor="#313131"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mGuidCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvGuid">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mRecycle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dp_10"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvGuid">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mGuide_4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="@dimen/dp_0">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_shangchuan" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:text="数据管理"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mGuide2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="@dimen/dp_0">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_my_guanjia" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:text="我的管家"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mGuide_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="@dimen/dp_0">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_my_fangan" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:text="我的方案"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mReport"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="@dimen/dp_0">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_my_report" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:text="我的报告"
|
||||
android:textColor="@color/col_455"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llWarning"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/shape_white_8radius"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_23"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/llguide">
|
||||
<!-- 健康预警 -->
|
||||
<!-- 健康指导 -->
|
||||
<TextView
|
||||
android:id="@+id/mTvEarly"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:text="@string/health_early"
|
||||
android:textColor="#313131"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mEarlyCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvEarly">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mLinEary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/dp_15">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivWarn3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_fangai"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintDimensionRatio="152:65"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivWarn2"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivWarn2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_fengxainyujing"
|
||||
app:layout_constraintDimensionRatio="152:65"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toEndOf="@id/ivWarn3"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivWarn1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/ic_30yujing"
|
||||
app:layout_constraintDimensionRatio="152:65"
|
||||
app:layout_constraintEnd_toStartOf="@id/ivTongueDiagnosis"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivTongueDiagnosis"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/img_tongue_diagnosis"
|
||||
app:layout_constraintDimensionRatio="152:65"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toEndOf="@id/ivWarn1"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llIot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:background="@drawable/shape_white_8radius"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_23"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/llmanage">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvThingNet"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:text="@string/health_thing_net"
|
||||
android:textColor="#313131"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="UseCompatTextViewDrawableXml" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mThingNetCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_8"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mTvThingNet">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
android:id="@+id/mLinThingNet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_21"
|
||||
android:paddingBottom="@dimen/dp_22">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llWatch"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginRight="@dimen/dp_6"
|
||||
android:src="@mipmap/ic_watch_small" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:text="手表"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWatchBind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="未绑定手表"
|
||||
android:textColor="@color/col_7c7"
|
||||
android:textSize="@dimen/sp_11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:background="@color/gray_eb"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llXueya"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginRight="@dimen/dp_6"
|
||||
android:src="@mipmap/ic_xueya" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:text="血压计"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvXueyaNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="已绑定0台"
|
||||
android:textColor="@color/col_7c7"
|
||||
android:textSize="@dimen/sp_11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llXuetang"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginRight="@dimen/dp_6"
|
||||
android:src="@mipmap/ic_xuetang" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:text="血糖仪"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvXuetangNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="已绑定0台"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:background="@color/gray_eb"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llBodyFat"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginRight="@dimen/dp_6"
|
||||
android:src="@mipmap/ic_body_fat" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_2"
|
||||
android:text="体脂秤"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBodyFatNum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="已绑定0台"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:textSize="@dimen/sp_11" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lleach"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/shape_white_8radius"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/dp_23"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/llIot">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mInter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableLeft="@drawable/shape_head_tip_new"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:paddingLeft="@dimen/dp_16"
|
||||
android:paddingRight="@dimen/dp_16"
|
||||
android:text="@string/health_inter"
|
||||
android:textColor="#313131"
|
||||
android:textSize="@dimen/sp_17"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mRecyclemCardview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mInter">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mRecyclemInter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:paddingTop="@dimen/dp_20">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mRelInterBD"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ic_bd"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_bd_new" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bd_tittle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_toRightOf="@+id/ic_bd"
|
||||
android:text="@string/intera_2"
|
||||
android:textColor="@color/col_3a4"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bd_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_bd_tittle"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_toRightOf="@+id/ic_bd"
|
||||
android:textColor="@color/col_B8B"
|
||||
android:textSize="@dimen/dp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_bd"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/shape_bind_bg_new_3"
|
||||
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/col_8D0"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mRelInterDk"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ic_dk"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_dk_new" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_dk_tittle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_toRightOf="@+id/ic_dk"
|
||||
android:text="@string/intera_1"
|
||||
android:textColor="@color/col_3a4"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_dk_tittle"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_toRightOf="@+id/ic_dk"
|
||||
android:text="养成生活好习惯"
|
||||
android:textColor="@color/col_B8B"
|
||||
android:textSize="@dimen/dp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_dk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/shape_bind_bg_new_3"
|
||||
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/col_8D0"
|
||||
android:textSize="@dimen/dp_12" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mRelInterFamily"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ic_family"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_family_new" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_family_tittle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_toRightOf="@+id/ic_family"
|
||||
android:text="@string/intera_3"
|
||||
android:textColor="@color/col_3a4"
|
||||
android:textSize="@dimen/dp_14"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_family_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/tv_family_tittle"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_toRightOf="@+id/ic_family"
|
||||
android:textColor="@color/col_B8B"
|
||||
android:textSize="@dimen/dp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_family"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/shape_bind_bg_new_3"
|
||||
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/col_8D0"
|
||||
android:textSize="@dimen/dp_12" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,327 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#F2F6F7"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_health_bg_new"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_86">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_head_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 我的家人列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecycle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_17"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/mMsgLayout"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginBottom="@dimen/dp_6"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/mMsg"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/ic_health_msg" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mBadgeCard"
|
||||
android:layout_width="@dimen/dp_13"
|
||||
android:layout_height="@dimen/dp_13"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:visibility="gone"
|
||||
app:cardBackgroundColor="@color/col_f23"
|
||||
app:cardCornerRadius="@dimen/dp_10"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mBadge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
tools:text="12" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 下拉刷新控件 -->
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
app:srlAccentColor="@color/white">
|
||||
|
||||
<!-- 经典下拉头部 -->
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foregroundTint="@color/black"
|
||||
app:srlAccentColor="@color/black"
|
||||
app:srlPrimaryColor="@color/white" />
|
||||
|
||||
<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">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_72"
|
||||
android:layout_marginStart="@dimen/dp_39"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_status_bg" />
|
||||
|
||||
<include
|
||||
android:id="@+id/mCom"
|
||||
layout="@layout/frag_dynamic_management_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_my_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mCom">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/my_manager"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_13"
|
||||
android:drawableStart="@mipmap/ic_my_manager"
|
||||
android:drawablePadding="@dimen/dp_9"
|
||||
android:gravity="center"
|
||||
android:text="我的管家"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/my_health_da"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_14"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_13"
|
||||
android:drawableStart="@mipmap/ic_my_da"
|
||||
android:drawablePadding="@dimen/dp_9"
|
||||
android:gravity="center"
|
||||
android:text="健康档案"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_15" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/mBannerCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_my_info">
|
||||
|
||||
<com.youth.banner.Banner
|
||||
android:id="@+id/mBanner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:background="@drawable/shape_banner_bg"
|
||||
app:banner_indicator_normal_color="@color/col_298D0"
|
||||
app:banner_indicator_selected_color="@color/col_8D0"
|
||||
app:banner_infinite_loop="true"
|
||||
app:banner_loop_time="4000" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cv_tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_14"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
app:cardCornerRadius="@dimen/dp_5"
|
||||
app:cardElevation="@dimen/dp_0"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mBannerCard">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
android:paddingBottom="@dimen/dp_15">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_risk_commit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:text="@string/early_2"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:drawableTopCompat="@mipmap/ic_risk_evaluate" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tongue_diagnosis"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:text="@string/tongue_diagnoise"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:drawableTopCompat="@mipmap/ic_tongue_diagnosis" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_check_cancer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@mipmap/ic_cancer_prevention"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:text="@string/cancer_prevention"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_health_risk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:drawableTop="@mipmap/ic_health_risk"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:gravity="center"
|
||||
android:text="@string/health_risk"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- 健康监测 -->
|
||||
<include
|
||||
android:id="@+id/mOrgan_view"
|
||||
layout="@layout/child_organ_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mBannerCard" />
|
||||
|
||||
<include
|
||||
android:id="@+id/mChild_home_view"
|
||||
layout="@layout/child_home_healt"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/cv_tools" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="@dimen/dp_15"
|
||||
android:text="- 用科技守护健康 -"
|
||||
android:textColor="@color/col_8D0"
|
||||
android:textSize="@dimen/dp_15"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mChild_home_view" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,105 @@
|
||||
<?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"
|
||||
tools:ignore="MissingDefaultResource"
|
||||
android:background="@color/white">
|
||||
<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_56"
|
||||
android:layout_marginBottom="@dimen/dp_17"
|
||||
app:corner_radius="@dimen/dp_18"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@color/white"
|
||||
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"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="请输入商品名称"
|
||||
android:layout_toRightOf="@+id/img_search"
|
||||
android:layout_centerVertical="true"
|
||||
android:textColor="@color/col_313"
|
||||
android:background="@null"
|
||||
android:textColorHint="@color/col_7c7"
|
||||
android:imeOptions="actionSearch"
|
||||
android:singleLine="true"
|
||||
android:inputType="text"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:layout_marginLeft="@dimen/dp_7"/>
|
||||
|
||||
</com.ruffian.library.widget.RRelativeLayout>
|
||||
|
||||
<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">
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<com.scwang.smart.refresh.header.ClassicsHeader
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:foregroundTint="@color/white"
|
||||
app:srlAccentColor="@color/black"
|
||||
app:srlPrimaryColor="@color/white" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:layout_marginBottom="@dimen/dp_5"
|
||||
android:id="@+id/category_recyclerView"/>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/col_6f7"
|
||||
android:paddingTop="@dimen/dp_15"
|
||||
app:srlAccentColor="@color/col_6f7"
|
||||
android:paddingLeft="@dimen/dp_15"
|
||||
android:paddingRight="@dimen/dp_15"
|
||||
android:id="@+id/recyclerView"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tv_child_category"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_39"
|
||||
android:minWidth="@dimen/dp_88"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_313"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:maxEms="5"
|
||||
tools:text="女士女士女士女士女士女士"
|
||||
android:gravity="center"
|
||||
android:background="@color/white"
|
||||
/>
|
||||
|
@ -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:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<com.ruffian.library.widget.RImageView
|
||||
android:id="@+id/img_goods"
|
||||
android:layout_width="@dimen/dp_89"
|
||||
android:layout_height="@dimen/dp_89"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
|
||||
android:scaleType="fitXY"
|
||||
app:is_circle="false"
|
||||
app:corner_radius="@dimen/dp_5"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@+id/img_goods"
|
||||
app:layout_constraintLeft_toRightOf="@+id/img_goods"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_price"
|
||||
android:gravity="left"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginRight="@dimen/dp_12"
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
tools:text="中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航..."
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@+id/img_goods"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_line_price"
|
||||
android:textColor="@color/col_2621"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
tools:text="¥1999.00"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_line_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintLeft_toRightOf="@+id/img_goods"
|
||||
android:textColor="@color/col_c7c"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/img_goods"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
tools:text="¥1999.00"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -0,0 +1,36 @@
|
||||
<?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_gravity="center"
|
||||
android:id="@+id/root"
|
||||
android:gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.ruffian.library.widget.RImageView
|
||||
android:id="@+id/img_category"
|
||||
android:layout_width="@dimen/dp_47"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
|
||||
app:is_circle="true"
|
||||
app:border_color="@color/white"
|
||||
android:scaleType="centerCrop"
|
||||
app:border_width="@dimen/dp_1"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_category"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/col_313"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:maxEms="5"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
tools:text="低卡零食低卡零食"/>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_round_white"
|
||||
android:paddingBottom="@dimen/dp_11"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<com.ruffian.library.widget.RImageView
|
||||
android:id="@+id/img_goods"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_165"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:is_circle="false"
|
||||
android:scaleType="fitXY"
|
||||
app:corner_radius_bottom_left="@dimen/dp_0"
|
||||
app:corner_radius_bottom_right="@dimen/dp_0"
|
||||
app:corner_radius_top_right="@dimen/dp_8"
|
||||
app:corner_radius_top_left="@dimen/dp_8"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_goods_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/img_goods"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_price"
|
||||
android:gravity="left"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/col_313"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
tools:text="中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航中健健康智能手表血糖血脂尿酸风险长续航..."
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_goods_name"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:textColor="@color/col_2621"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
tools:text="¥1999.00"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_line_price"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_goods_name"
|
||||
app:layout_constraintLeft_toRightOf="@+id/tv_price"
|
||||
android:textColor="@color/col_c7c"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
tools:text="¥1999.00"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 123 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 133 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 94 KiB |
Before Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 30 KiB |