添加引导页付费(待完善)
|
|
@ -36,4 +36,7 @@ class ConfigEntity {
|
||||||
|
|
||||||
@SerializedName("client.invoice.urgent.interval.minutes") //加急开票间隔分钟数
|
@SerializedName("client.invoice.urgent.interval.minutes") //加急开票间隔分钟数
|
||||||
var invoiceIntervalMinutes: String? = null
|
var invoiceIntervalMinutes: String? = null
|
||||||
|
|
||||||
|
@SerializedName("client.guide.pay.countdown.time") //引导页支付倒计时
|
||||||
|
var guideCountdownTime: String? = null
|
||||||
}
|
}
|
||||||
|
|
@ -85,6 +85,7 @@ object UserConfigManager {
|
||||||
saveServicePhoneList(data.config!!.servicePhoneList)
|
saveServicePhoneList(data.config!!.servicePhoneList)
|
||||||
savePayType(data.config!!.payType)
|
savePayType(data.config!!.payType)
|
||||||
saveInvoiceIntervalTime(data.config!!.invoiceIntervalMinutes)
|
saveInvoiceIntervalTime(data.config!!.invoiceIntervalMinutes)
|
||||||
|
saveGuideCountdownTime(data.config!!.guideCountdownTime)
|
||||||
}
|
}
|
||||||
} catch (e : Exception) {
|
} catch (e : Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
|
|
@ -301,6 +302,17 @@ object UserConfigManager {
|
||||||
return emptyList()
|
return emptyList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 引导页支付倒计时
|
||||||
|
*/
|
||||||
|
private fun saveGuideCountdownTime(time: String?) {
|
||||||
|
MMKVUtils.put("guide_countdown_time", time)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getGuideCountdownTime(): String? {
|
||||||
|
return MMKVUtils.getString("guide_countdown_time")
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存个推cid
|
* 保存个推cid
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.cheng.blzb.ui.dialog
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.app.Dialog
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.drawable.ColorDrawable
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.fragment.app.DialogFragment
|
||||||
|
import com.cheng.blzb.R
|
||||||
|
import com.cheng.blzb.common.Constants
|
||||||
|
import com.cheng.blzb.databinding.DialogGuideSaleBinding
|
||||||
|
import com.cheng.blzb.manager.UserConfigManager
|
||||||
|
import com.example.base.extensions.onClick
|
||||||
|
import com.example.base.utils.ScreenUtils
|
||||||
|
|
||||||
|
class GuideSaleDialog : DialogFragment() {
|
||||||
|
private var totalSeconds = 0L
|
||||||
|
|
||||||
|
private var mOnBackListener: ((Long) -> Unit)? = null //回调事件
|
||||||
|
|
||||||
|
lateinit var binding: DialogGuideSaleBinding
|
||||||
|
|
||||||
|
override fun onStart() {
|
||||||
|
super.onStart()
|
||||||
|
val window = dialog?.window
|
||||||
|
val windowParams = window?.attributes
|
||||||
|
windowParams?.dimAmount = 0.7f
|
||||||
|
windowParams?.width = ScreenUtils.getWindowSize().x
|
||||||
|
windowParams?.height = ScreenUtils.getWindowSize().y
|
||||||
|
dialog?.window?.attributes = windowParams
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
|
dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||||
|
setCancelable(false)
|
||||||
|
return super.onCreateView(inflater, container, savedInstanceState)
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
|
val view = layoutInflater.inflate(R.layout.dialog_guide_sale, null)
|
||||||
|
|
||||||
|
binding = DialogGuideSaleBinding.bind(view)
|
||||||
|
|
||||||
|
binding.tvEndTip2.typeface = Constants.almmsht
|
||||||
|
binding.tvOriginPrice.typeface = Constants.dDIN_PRO_M
|
||||||
|
binding.tvPrice.typeface = Constants.dDIN_PRO_M
|
||||||
|
binding.tvNext.typeface = Constants.almmsht
|
||||||
|
|
||||||
|
val countDownTime = UserConfigManager.getGuideCountdownTime()
|
||||||
|
if (!TextUtils.isEmpty(countDownTime)) {
|
||||||
|
totalSeconds = countDownTime!!.split(",")[1].toLong()
|
||||||
|
binding.tvNext.text = "考虑${totalSeconds}秒"
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvNext.onClick {
|
||||||
|
mOnBackListener?.invoke(totalSeconds)
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
val dialog = Dialog(requireContext())
|
||||||
|
dialog.setContentView(view)
|
||||||
|
return dialog
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setOnSelectListener(listener: ((Long) -> Unit)) {
|
||||||
|
mOnBackListener = listener
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(): GuideSaleDialog {
|
||||||
|
val arg = Bundle()
|
||||||
|
val fragment = GuideSaleDialog()
|
||||||
|
fragment.arguments = arg
|
||||||
|
return fragment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package com.cheng.blzb.ui.fragment.guide.item
|
||||||
import android.animation.AnimatorSet
|
import android.animation.AnimatorSet
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
import android.animation.ValueAnimator
|
import android.animation.ValueAnimator
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.view.animation.AccelerateDecelerateInterpolator
|
import android.view.animation.AccelerateDecelerateInterpolator
|
||||||
import android.view.animation.LinearInterpolator
|
import android.view.animation.LinearInterpolator
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
|
@ -28,6 +29,7 @@ import com.yy.mobile.rollingtextview.strategy.Strategy
|
||||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.rxjava3.core.Observable
|
import io.reactivex.rxjava3.core.Observable
|
||||||
import io.reactivex.rxjava3.disposables.Disposable
|
import io.reactivex.rxjava3.disposables.Disposable
|
||||||
|
import org.jetbrains.anko.sdk27.listeners.onTouch
|
||||||
import org.libpag.PAGFile
|
import org.libpag.PAGFile
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
|
|
@ -51,6 +53,7 @@ class GuideItem5Fragment : BaseFragment<FragmentGuideItem5Binding, GuideViewMode
|
||||||
binding.rvIndustry.adapter = industryAdapter
|
binding.rvIndustry.adapter = industryAdapter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun onLazyLoad() {
|
override fun onLazyLoad() {
|
||||||
super.onLazyLoad()
|
super.onLazyLoad()
|
||||||
totalInfo = GuideFragment.totalInfo
|
totalInfo = GuideFragment.totalInfo
|
||||||
|
|
@ -65,6 +68,11 @@ class GuideItem5Fragment : BaseFragment<FragmentGuideItem5Binding, GuideViewMode
|
||||||
startAnim()
|
startAnim()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun initListener() {
|
||||||
|
super.initListener()
|
||||||
|
binding.rvIndustry.onTouch { _, _ -> true }
|
||||||
|
}
|
||||||
|
|
||||||
private fun startAnim() {
|
private fun startAnim() {
|
||||||
val bgTransAnim = ObjectAnimator.ofFloat(binding.ivBg, "translationY", 0f, -DensityUtils.dp2px(75f).toFloat())
|
val bgTransAnim = ObjectAnimator.ofFloat(binding.ivBg, "translationY", 0f, -DensityUtils.dp2px(75f).toFloat())
|
||||||
bgTransAnim.duration = 2000
|
bgTransAnim.duration = 2000
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
package com.cheng.blzb.ui.fragment.guide.vip
|
||||||
|
|
||||||
|
import android.util.TypedValue
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.TextView
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.core.graphics.toColorInt
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.blzb.R
|
||||||
|
import com.cheng.blzb.bean.VipGoodsEntity
|
||||||
|
import com.cheng.blzb.common.Constants
|
||||||
|
import com.example.base.extensions.getColor
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
import com.example.base.utils.SpanUtils
|
||||||
|
import com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
import java.text.DecimalFormat
|
||||||
|
|
||||||
|
class GuideVipAdapter: BaseQuickAdapter<VipGoodsEntity, BaseViewHolder>(R.layout.listitem_guide_vip_goods) {
|
||||||
|
|
||||||
|
override fun convert(holder: BaseViewHolder, item: VipGoodsEntity) {
|
||||||
|
holder.setGone(R.id.tv_tag, true)
|
||||||
|
if (item.tips.isNotEmpty()) {
|
||||||
|
holder.setVisible(R.id.tv_tag, true)
|
||||||
|
holder.setText(R.id.tv_tag, item.tips)
|
||||||
|
}
|
||||||
|
|
||||||
|
holder.setText(R.id.tv_goods_name, item.goods_name)
|
||||||
|
SpanUtils.with(holder.getView(R.id.tv_price))
|
||||||
|
.append("¥")
|
||||||
|
.setFontSize(if (item.checked) 14 else 11, true)
|
||||||
|
.append(DecimalFormat("0.##").format(item.price.toFloat()))
|
||||||
|
.setFontSize(if (item.checked) 34 else 29, true)
|
||||||
|
.create()
|
||||||
|
SpanUtils.with(holder.getView(R.id.tv_origin_price))
|
||||||
|
.append("¥${item.origin_price}")
|
||||||
|
.setStrikethrough()
|
||||||
|
.create()
|
||||||
|
|
||||||
|
holder.setBackgroundResource(R.id.layout_content, if (item.checked) R.mipmap.ic_guide_vip_goods_checked else R.mipmap.ic_guide_vip_goods_default)
|
||||||
|
|
||||||
|
holder.getView<TextView>(R.id.tv_tag).setTextSize(TypedValue.COMPLEX_UNIT_SP, if (item.checked) 10f else 8f)
|
||||||
|
holder.getView<TextView>(R.id.tv_goods_name).setTextSize(TypedValue.COMPLEX_UNIT_SP, if (item.checked) 20f else 16f)
|
||||||
|
holder.getView<TextView>(R.id.tv_origin_price).setTextSize(TypedValue.COMPLEX_UNIT_SP, if (item.checked) 10f else 8f)
|
||||||
|
|
||||||
|
holder.getView<TextView>(R.id.tv_goods_name).typeface = Constants.pmzdbt
|
||||||
|
holder.getView<TextView>(R.id.tv_price).typeface = Constants.dDIN_PRO_M
|
||||||
|
|
||||||
|
val parentWidth = recyclerView.width
|
||||||
|
val minWidth = (0.3 * parentWidth).toInt()
|
||||||
|
|
||||||
|
val layoutContent = holder.getView<ViewGroup>(R.id.layout_content)
|
||||||
|
val layoutParams = layoutContent.layoutParams as ConstraintLayout.LayoutParams
|
||||||
|
if (item.checked) {
|
||||||
|
layoutParams.dimensionRatio = "h,122:148"
|
||||||
|
layoutContent.layoutParams = layoutParams
|
||||||
|
|
||||||
|
holder.itemView.layoutParams = ViewGroup.LayoutParams(parentWidth - minWidth * 2 - DensityUtils.dp2px(20f), ViewGroup.LayoutParams.MATCH_PARENT)
|
||||||
|
|
||||||
|
holder.getView<TextView>(R.id.tv_tag).setPadding(DensityUtils.dp2px(6f), DensityUtils.dp2px(2f), DensityUtils.dp2px(6f), DensityUtils.dp2px(2f))
|
||||||
|
|
||||||
|
val tvGoodsName = holder.getView<GradientTextView>(R.id.tv_goods_name)
|
||||||
|
tvGoodsName.angle = 270f
|
||||||
|
tvGoodsName.gradientColors = intArrayOf("#20F3E6".toColorInt(), "#05ACE8".toColorInt())
|
||||||
|
holder.setTextColor(R.id.tv_price, getColor(R.color.white))
|
||||||
|
holder.setTextColor(R.id.tv_origin_price, getColor(R.color.color_a6acb5))
|
||||||
|
} else {
|
||||||
|
layoutParams.dimensionRatio = "h,100:118"
|
||||||
|
layoutContent.layoutParams = layoutParams
|
||||||
|
|
||||||
|
holder.itemView.layoutParams = ViewGroup.LayoutParams(minWidth, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||||
|
|
||||||
|
holder.getView<TextView>(R.id.tv_tag).setPadding(DensityUtils.dp2px(4f), DensityUtils.dp2px(1f), DensityUtils.dp2px(4f), DensityUtils.dp2px(1f))
|
||||||
|
|
||||||
|
val tvGoodsName = holder.getView<GradientTextView>(R.id.tv_goods_name)
|
||||||
|
tvGoodsName.angle = 0f
|
||||||
|
tvGoodsName.gradientColors = intArrayOf("#FFFFFF".toColorInt(), "#61D0FC".toColorInt())
|
||||||
|
holder.setTextColor(R.id.tv_price, getColor(R.color.color_9bbbdf))
|
||||||
|
holder.setTextColor(R.id.tv_origin_price, getColor(R.color.color_a6acb5))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,37 +1,605 @@
|
||||||
package com.cheng.blzb.ui.fragment.guide.vip
|
package com.cheng.blzb.ui.fragment.guide.vip
|
||||||
|
|
||||||
|
import android.animation.AnimatorSet
|
||||||
|
import android.animation.ObjectAnimator
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
import android.os.Build
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewTreeObserver.OnGlobalLayoutListener
|
||||||
import android.window.OnBackInvokedDispatcher
|
import android.window.OnBackInvokedDispatcher
|
||||||
import androidx.activity.addCallback
|
import androidx.activity.addCallback
|
||||||
|
import androidx.core.animation.addListener
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.os.BuildCompat
|
import androidx.core.os.BuildCompat
|
||||||
|
import androidx.core.view.isVisible
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.cheng.blzb.R
|
||||||
|
import com.cheng.blzb.bean.GuideTotalBidEntity
|
||||||
|
import com.cheng.blzb.bean.GuideUpdateEntity
|
||||||
|
import com.cheng.blzb.bean.HotWordEntity
|
||||||
|
import com.cheng.blzb.bean.OrderPayEntity
|
||||||
|
import com.cheng.blzb.bean.VipGoodsEntity
|
||||||
|
import com.cheng.blzb.common.Constants
|
||||||
|
import com.cheng.blzb.common.EventConstants
|
||||||
import com.cheng.blzb.databinding.FragmentGuideVipBinding
|
import com.cheng.blzb.databinding.FragmentGuideVipBinding
|
||||||
|
import com.cheng.blzb.event.PayStatusEnum
|
||||||
|
import com.cheng.blzb.event.PayStatusEvent
|
||||||
|
import com.cheng.blzb.manager.EventReportManager
|
||||||
|
import com.cheng.blzb.manager.LoginManager
|
||||||
|
import com.cheng.blzb.manager.UserConfigManager
|
||||||
import com.cheng.blzb.ui.activity.MainActivity
|
import com.cheng.blzb.ui.activity.MainActivity
|
||||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
import com.cheng.blzb.ui.activity.PublicActivity
|
||||||
|
import com.cheng.blzb.ui.dialog.GuideSaleDialog
|
||||||
|
import com.cheng.blzb.ui.dialog.PayTipDialog
|
||||||
|
import com.cheng.blzb.ui.fragment.mine.order.cert.CertificateFragment
|
||||||
|
import com.cheng.blzb.utils.DateUtils
|
||||||
|
import com.cheng.blzb.utils.UrlHelper
|
||||||
|
import com.cheng.blzb.utils.pay.PayUtils
|
||||||
|
import com.cheng.blzb.widget.BarChartView
|
||||||
|
import com.example.base.common.RxBus
|
||||||
|
import com.example.base.common.RxCountDown
|
||||||
|
import com.example.base.decoration.SpacesItemDecoration
|
||||||
|
import com.example.base.extensions.getColor
|
||||||
|
import com.example.base.extensions.getDD
|
||||||
|
import com.example.base.extensions.gone
|
||||||
import com.example.base.extensions.onClick
|
import com.example.base.extensions.onClick
|
||||||
|
import com.example.base.extensions.toast
|
||||||
|
import com.example.base.extensions.visible
|
||||||
import com.example.base.ui.BaseFragment
|
import com.example.base.ui.BaseFragment
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
import com.example.base.utils.ScreenUtils
|
||||||
|
import com.example.base.utils.SpanUtils
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import com.google.gson.reflect.TypeToken
|
||||||
|
import com.tencent.mm.opensdk.openapi.IWXAPI
|
||||||
|
import com.tencent.mm.opensdk.openapi.WXAPIFactory
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.rxjava3.core.Observable
|
||||||
|
import io.reactivex.rxjava3.disposables.Disposable
|
||||||
|
import org.jetbrains.anko.sdk27.listeners.onCheckedChange
|
||||||
|
import org.jetbrains.anko.sdk27.listeners.onTouch
|
||||||
import org.jetbrains.anko.startActivity
|
import org.jetbrains.anko.startActivity
|
||||||
|
import java.text.DecimalFormat
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
import kotlin.collections.forEachIndexed
|
||||||
|
|
||||||
class GuideVipFragment: BaseFragment<FragmentGuideVipBinding, GuideViewModel>() {
|
class GuideVipFragment: BaseFragment<FragmentGuideVipBinding, GuideVipViewModel>() {
|
||||||
|
private val userTipsAdapter by lazy { GuideVipUserAdapter(requireContext(), userTipsList) }
|
||||||
|
private val industryAdapter by lazy { GuideVipIndustryAdapter(requireContext(), hotWordChildList) }
|
||||||
|
|
||||||
|
private val userTipsList = mutableListOf<String>()
|
||||||
|
private val hotWordChildList = mutableListOf<HotWordEntity.Child>()
|
||||||
|
private var totalInfo: GuideTotalBidEntity? = null
|
||||||
|
|
||||||
|
private val updateInfoList = mutableListOf<GuideUpdateEntity>()
|
||||||
|
|
||||||
|
private var payType = 0 // 0 微信 1 支付宝 2 对公转账
|
||||||
|
|
||||||
|
private lateinit var api: IWXAPI
|
||||||
|
private var isAgree = false
|
||||||
|
private var totalPrice = 0f
|
||||||
|
|
||||||
|
private val goodsAdapter by lazy { GuideVipAdapter() }
|
||||||
|
|
||||||
|
private var goodsEntity: VipGoodsEntity? = null
|
||||||
|
private var orderEntity: OrderPayEntity? = null
|
||||||
|
|
||||||
|
private var totalSeconds = 0L
|
||||||
|
private var countdownDisposable: Disposable? = null
|
||||||
|
private var scrollTask: Disposable? = null
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
super.initView()
|
super.initView()
|
||||||
|
binding.tvTotalInfoCount1.typeface = Constants.dDIN_PRO_M
|
||||||
|
binding.tvTotalInfoCount2.typeface = Constants.dDIN_PRO_M
|
||||||
|
binding.tvTotalInfoCount3.typeface = Constants.dDIN_PRO_M
|
||||||
|
binding.tvTotalInfoCount4.typeface = Constants.dDIN_PRO_M
|
||||||
|
binding.tvPrice.typeface = Constants.dDIN_PRO_M
|
||||||
|
|
||||||
|
binding.rvUser.adapter = userTipsAdapter
|
||||||
|
|
||||||
|
binding.viewFlipper.adapter = industryAdapter
|
||||||
|
|
||||||
|
binding.rvGoods.adapter = goodsAdapter
|
||||||
|
binding.rvGoods.addItemDecoration(SpacesItemDecoration(DensityUtils.dp2px(10f), RecyclerView.HORIZONTAL))
|
||||||
|
|
||||||
|
binding.cbAgree.visibility = if (UserConfigManager.isPayAgreementEnable()) View.VISIBLE else View.GONE
|
||||||
|
binding.tvAgree.visibility = if (UserConfigManager.isPayAgreementEnable()) View.VISIBLE else View.GONE
|
||||||
|
|
||||||
|
binding.layoutContent.viewTreeObserver.addOnGlobalLayoutListener(object : OnGlobalLayoutListener {
|
||||||
|
override fun onGlobalLayout() {
|
||||||
|
mViewModel.getGoodsList()
|
||||||
|
binding.layoutContent.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initData() {
|
override fun initData() {
|
||||||
super.initData()
|
super.initData()
|
||||||
|
api = WXAPIFactory.createWXAPI(requireContext(), Constants.WechatAppId)
|
||||||
|
|
||||||
|
mViewModel.getPayUserTips()
|
||||||
|
mViewModel.getUpdateNum()
|
||||||
|
|
||||||
|
setData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun initListener() {
|
override fun initListener() {
|
||||||
super.initListener()
|
super.initListener()
|
||||||
setBackPressed()
|
setBackPressed()
|
||||||
|
|
||||||
|
binding.rvUser.onTouch { _, _ -> true }
|
||||||
|
|
||||||
|
goodsAdapter.setOnItemClickListener { _, _, i ->
|
||||||
|
val item = goodsAdapter.getItem(i)
|
||||||
|
if (item.goods_id == goodsEntity?.goods_id) return@setOnItemClickListener
|
||||||
|
goodsAdapter.data.forEach { it.checked = it.goods_id == item.goods_id }
|
||||||
|
goodsAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
goodsEntity = item
|
||||||
|
setPrice(goodsEntity!!.price.toFloat())
|
||||||
|
releasePayType()
|
||||||
|
}
|
||||||
|
|
||||||
binding.ivClose.onClick {
|
binding.ivClose.onClick {
|
||||||
requireActivity().startActivity<MainActivity>()
|
requireActivity().startActivity<MainActivity>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.tvAliPay.onClick {
|
||||||
|
payType = 1
|
||||||
|
checkPayType()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvWxPay.onClick {
|
||||||
|
payType = 0
|
||||||
|
checkPayType()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvBankPay.onClick {
|
||||||
|
payType = 2
|
||||||
|
checkPayType()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.cbAgree.onCheckedChange { _, isChecked ->
|
||||||
|
isAgree = isChecked
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvAgree.onClick {
|
||||||
|
binding.cbAgree.isChecked = !binding.cbAgree.isChecked
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvPay.onClick {
|
||||||
|
if (goodsEntity == null) return@onClick
|
||||||
|
if (!UserConfigManager.getNoLoginPay() && !LoginManager.isLogin()) {
|
||||||
|
toast("请登录后支付")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (payType == 0 && !api.isWXAppInstalled) {
|
||||||
|
toast("您没有安装微信客户端,请先下载安装")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (UserConfigManager.isPayAgreementEnable() && !isAgree) {
|
||||||
|
val f = PayTipDialog.newInstance(showAgreement = true, showRenew = !TextUtils.isEmpty(goodsEntity?.sign_value) && payType == 1)
|
||||||
|
f.setOnSelectListener {
|
||||||
|
binding.cbAgree.isChecked = true
|
||||||
|
if (payType == 0) {
|
||||||
|
mViewModel.payCreateOrder(goodsEntity!!.goods_id, "weixin")
|
||||||
|
} else if (payType == 1) {
|
||||||
|
mViewModel.payCreateOrder(goodsEntity!!.goods_id, "alipay")
|
||||||
|
} else if (payType == 2) {
|
||||||
|
mViewModel.payCreateOrder(goodsEntity!!.goods_id, "bank")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
f.show(childFragmentManager, PayTipDialog::class.java.simpleName)
|
||||||
|
} else {
|
||||||
|
if (payType == 0) {
|
||||||
|
mViewModel.payCreateOrder(goodsEntity!!.goods_id, "weixin")
|
||||||
|
} else if (payType == 1) {
|
||||||
|
mViewModel.payCreateOrder(goodsEntity!!.goods_id, "alipay")
|
||||||
|
} else if (payType == 2) {
|
||||||
|
mViewModel.payCreateOrder(goodsEntity!!.goods_id, "bank")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EventReportManager.eventReport(
|
||||||
|
EventConstants.PAY_PAY,
|
||||||
|
if (payType == 0) "weixin" else if (payType == 1) "alipay" else "bank",
|
||||||
|
Gson().toJson(goodsEntity)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun initObserve() {
|
override fun initObserve() {
|
||||||
super.initObserve()
|
super.initObserve()
|
||||||
|
mViewModel.goodsListLiveData.observe(this) { list ->
|
||||||
|
goodsAdapter.setList(list)
|
||||||
|
|
||||||
|
goodsEntity = list.find { it.checked }
|
||||||
|
if (goodsEntity == null && list.isNotEmpty()) {
|
||||||
|
goodsEntity = list[0]
|
||||||
|
}
|
||||||
|
if (goodsEntity != null) {
|
||||||
|
setPrice(goodsEntity!!.price.toFloat())
|
||||||
|
releasePayType()
|
||||||
|
}
|
||||||
|
initPrivacyTv()
|
||||||
|
startAnim()
|
||||||
|
}
|
||||||
|
|
||||||
|
mViewModel.createOrderLiveData.observe(this) {
|
||||||
|
orderEntity = it
|
||||||
|
if (payType == 0) {
|
||||||
|
PayUtils.toWXPay(requireActivity(), it)
|
||||||
|
} else if (payType == 1) {
|
||||||
|
PayUtils.toAliPay(requireActivity(), it.payParam, "")
|
||||||
|
} else {
|
||||||
|
PublicActivity.start(requireContext(), CertificateFragment::class.java, Pair("orderId", orderEntity!!.orderId))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mViewModel.payTipsLiveData.observe(this) {
|
||||||
|
userTipsList.addAll(it)
|
||||||
|
userTipsAdapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
mViewModel.updateLiveData.observe(this) {
|
||||||
|
updateInfoList.clear()
|
||||||
|
updateInfoList.addAll(it)
|
||||||
|
setChartData()
|
||||||
|
binding.tvChartTitle.text = "月份:${Calendar.getInstance().get(Calendar.MONTH) + 1}月 单位:条"
|
||||||
|
}
|
||||||
|
|
||||||
|
val payStatusDisposable = RxBus.defaultInstance.toObservable(PayStatusEvent::class.java).subscribe {
|
||||||
|
when (it.payStatus) {
|
||||||
|
PayStatusEnum.PAY_SUCCESS -> {
|
||||||
|
toast("支付成功")
|
||||||
|
EventReportManager.eventReport(
|
||||||
|
EventConstants.PAY_SUCCESS,
|
||||||
|
if (payType == 0) "weixin" else "alipay",
|
||||||
|
"{isGuide: true, orderId:${orderEntity?.orderId}, meal:${Gson().toJson(goodsEntity)}}"
|
||||||
|
)
|
||||||
|
requireActivity().startActivity<MainActivity>()
|
||||||
|
}
|
||||||
|
|
||||||
|
PayStatusEnum.PAY_CANCEL -> {
|
||||||
|
toast("已取消支付")
|
||||||
|
EventReportManager.eventReport(EventConstants.PAY_CANCEL, if (payType == 0) "weixin" else "alipay", "{isGuide: true, orderId:${orderEntity?.orderId}")
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
toast("已取消支付")
|
||||||
|
EventReportManager.eventReport(if (payType == 0) EventConstants.ERROR_CLIENT_WXPAY_ERR else EventConstants.ERROR_CLIENT_ALIPAY_ERR, "{isGuide: true, orderId:${orderEntity?.orderId}", it.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
addDisposable(payStatusDisposable)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setData() {
|
||||||
|
totalInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
arguments?.getSerializable("total", GuideTotalBidEntity::class.java)
|
||||||
|
} else {
|
||||||
|
arguments?.getSerializable("total") as? GuideTotalBidEntity
|
||||||
|
}
|
||||||
|
|
||||||
|
SpanUtils.with(binding.tvTotalInfoCount1)
|
||||||
|
.append("${totalInfo?.bidCount}")
|
||||||
|
.append("条")
|
||||||
|
.setFontSize(10, true)
|
||||||
|
.create()
|
||||||
|
SpanUtils.with(binding.tvTotalInfoCount2)
|
||||||
|
.append("${totalInfo?.hasContact}")
|
||||||
|
.append("条")
|
||||||
|
.setFontSize(10, true)
|
||||||
|
.create()
|
||||||
|
SpanUtils.with(binding.tvTotalInfoCount3)
|
||||||
|
.append("${totalInfo?.maxMoney}")
|
||||||
|
.append("亿元")
|
||||||
|
.setFontSize(10, true)
|
||||||
|
.create()
|
||||||
|
SpanUtils.with(binding.tvTotalInfoCount4)
|
||||||
|
.append("${totalInfo?.yesterdayCount}")
|
||||||
|
.append("条")
|
||||||
|
.setFontSize(10, true)
|
||||||
|
.create()
|
||||||
|
|
||||||
|
val hotWordListStr = arguments?.getString("hotWords")
|
||||||
|
if (!TextUtils.isEmpty(hotWordListStr)) {
|
||||||
|
hotWordChildList.addAll(Gson().fromJson<List<HotWordEntity.Child>>(hotWordListStr, object : TypeToken<List<HotWordEntity.Child>>() {}.type))
|
||||||
|
industryAdapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
val countDownTime = UserConfigManager.getGuideCountdownTime()
|
||||||
|
if (!TextUtils.isEmpty(countDownTime)) {
|
||||||
|
totalSeconds = countDownTime!!.split(",")[0].toLong()
|
||||||
|
startCountdown()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setChartData() {
|
||||||
|
val dateList = getDateList(updateInfoList, System.currentTimeMillis())
|
||||||
|
val valueList = mutableListOf<BarChartView.XAxisValue>()
|
||||||
|
updateInfoList.forEachIndexed { index, item ->
|
||||||
|
valueList.add(BarChartView.XAxisValue(item.count.toFloat(), dateList[index]))
|
||||||
|
}
|
||||||
|
binding.barChart.setData(valueList)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startAnim() {
|
||||||
|
val closeAlphaAnim = ObjectAnimator.ofFloat(binding.ivClose, "alpha", 0f, 1f)
|
||||||
|
closeAlphaAnim.duration = 1000
|
||||||
|
closeAlphaAnim.startDelay = 1800
|
||||||
|
closeAlphaAnim.addListener(onStart = {
|
||||||
|
binding.ivClose.visible()
|
||||||
|
})
|
||||||
|
|
||||||
|
val userTransAnim = ObjectAnimator.ofFloat(binding.rvUser, "translationX", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
||||||
|
userTransAnim.duration = 2000
|
||||||
|
userTransAnim.startDelay = 1800
|
||||||
|
userTransAnim.addListener(onStart = {
|
||||||
|
binding.rvUser.visible()
|
||||||
|
}, onEnd = {
|
||||||
|
startScroll()
|
||||||
|
})
|
||||||
|
|
||||||
|
val industryTransAnim = ObjectAnimator.ofFloat(binding.layoutIndustry, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
|
industryTransAnim.duration = 1000
|
||||||
|
industryTransAnim.addListener(onStart = {
|
||||||
|
binding.layoutIndustry.visible()
|
||||||
|
})
|
||||||
|
|
||||||
|
val tabTransAnim = ObjectAnimator.ofFloat(binding.layoutTab, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
|
tabTransAnim.duration = 1000
|
||||||
|
tabTransAnim.addListener(onStart = {
|
||||||
|
binding.layoutTab.visible()
|
||||||
|
})
|
||||||
|
|
||||||
|
val infoWidth = binding.layoutInfo.measuredWidth
|
||||||
|
val lineWidth = binding.ivInfoLight1.measuredWidth
|
||||||
|
val infoLine1TransAnim = ObjectAnimator.ofFloat(binding.ivInfoLight1, "translationX", 0f, -(infoWidth - lineWidth).toFloat()).setDuration(1000)
|
||||||
|
val infoLine2TransAnim = ObjectAnimator.ofFloat(binding.ivInfoLight2, "translationX", 0f, (infoWidth - lineWidth).toFloat()).setDuration(1000)
|
||||||
|
|
||||||
|
val infoRotateAnim = ObjectAnimator.ofFloat(binding.layoutInfo, "rotationX", 90f, -10f, 10f, 0f)
|
||||||
|
infoRotateAnim.duration = 1000
|
||||||
|
infoRotateAnim.startDelay = 800
|
||||||
|
infoRotateAnim.addListener(onStart = {
|
||||||
|
binding.layoutInfo.visible()
|
||||||
|
}, onEnd = {
|
||||||
|
infoLine1TransAnim.start()
|
||||||
|
infoLine2TransAnim.start()
|
||||||
|
})
|
||||||
|
|
||||||
|
val timeTransAnim = ObjectAnimator.ofFloat(binding.layoutCountdown, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
|
timeTransAnim.duration = 1000
|
||||||
|
timeTransAnim.startDelay = 1000
|
||||||
|
timeTransAnim.addListener(onStart = {
|
||||||
|
binding.layoutCountdown.visible()
|
||||||
|
})
|
||||||
|
|
||||||
|
val goodsTransAnim = ObjectAnimator.ofFloat(binding.rvGoods, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
|
goodsTransAnim.duration = 1000
|
||||||
|
goodsTransAnim.startDelay = 1200
|
||||||
|
goodsTransAnim.addListener(onStart = {
|
||||||
|
binding.rvGoods.visible()
|
||||||
|
})
|
||||||
|
|
||||||
|
val payTypeTransAnim = ObjectAnimator.ofFloat(binding.layoutPay, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
|
payTypeTransAnim.duration = 1000
|
||||||
|
payTypeTransAnim.startDelay = 1400
|
||||||
|
payTypeTransAnim.addListener(onStart = {
|
||||||
|
binding.layoutPay.visible()
|
||||||
|
})
|
||||||
|
|
||||||
|
val payBtnTransAnim = ObjectAnimator.ofFloat(binding.layoutPayBtn, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
|
payBtnTransAnim.duration = 1000
|
||||||
|
payBtnTransAnim.startDelay = 1400
|
||||||
|
payBtnTransAnim.addListener(onStart = {
|
||||||
|
binding.layoutPayBtn.visible()
|
||||||
|
})
|
||||||
|
|
||||||
|
val animSet = AnimatorSet()
|
||||||
|
animSet.playTogether(
|
||||||
|
closeAlphaAnim,
|
||||||
|
userTransAnim,
|
||||||
|
industryTransAnim,
|
||||||
|
tabTransAnim,
|
||||||
|
infoRotateAnim,
|
||||||
|
timeTransAnim,
|
||||||
|
goodsTransAnim,
|
||||||
|
payTypeTransAnim,
|
||||||
|
payBtnTransAnim
|
||||||
|
)
|
||||||
|
animSet.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun checkPayType() {
|
||||||
|
if (payType == 0) {
|
||||||
|
val start1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_wx_pay)
|
||||||
|
val end1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_checked)
|
||||||
|
binding.tvWxPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start1, null, end1, null)
|
||||||
|
|
||||||
|
val start2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_ali_pay)
|
||||||
|
val end2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_default)
|
||||||
|
binding.tvAliPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start2, null, end2, null)
|
||||||
|
|
||||||
|
val start3 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_transfer_pay)
|
||||||
|
val end3 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_default)
|
||||||
|
binding.tvBankPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start3, null, end3, null)
|
||||||
|
} else if (payType == 1) {
|
||||||
|
val start1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_ali_pay)
|
||||||
|
val end1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_checked)
|
||||||
|
binding.tvAliPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start1, null, end1, null)
|
||||||
|
|
||||||
|
val start2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_wx_pay)
|
||||||
|
val end2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_default)
|
||||||
|
binding.tvWxPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start2, null, end2, null)
|
||||||
|
|
||||||
|
val start3 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_transfer_pay)
|
||||||
|
val end3 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_default)
|
||||||
|
binding.tvBankPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start3, null, end3, null)
|
||||||
|
} else {
|
||||||
|
val start1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_transfer_pay)
|
||||||
|
val end1 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_checked)
|
||||||
|
binding.tvBankPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start1, null, end1, null)
|
||||||
|
|
||||||
|
val start2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_ali_pay)
|
||||||
|
val end2 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_default)
|
||||||
|
binding.tvAliPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start2, null, end2, null)
|
||||||
|
|
||||||
|
val start3 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_wx_pay)
|
||||||
|
val end3 = ContextCompat.getDrawable(requireContext(), R.mipmap.ic_guide_pay_default)
|
||||||
|
binding.tvWxPay.setCompoundDrawablesRelativeWithIntrinsicBounds(start3, null, end3, null)
|
||||||
|
}
|
||||||
|
initPrivacyTv()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun releasePayType() {
|
||||||
|
val list = goodsEntity?.pay_type?.split(",")?.map { it.trim() }?.toList()
|
||||||
|
val globalPayType = UserConfigManager.getPayType()
|
||||||
|
if (list?.find { it == "weixin" } != null && globalPayType.find { it == "weixin" } != null) {
|
||||||
|
binding.tvWxPay.visible()
|
||||||
|
} else {
|
||||||
|
binding.tvWxPay.gone()
|
||||||
|
}
|
||||||
|
if (list?.find { it == "alipay" } != null && globalPayType.find { it == "alipay" } != null) {
|
||||||
|
binding.tvAliPay.visible()
|
||||||
|
} else {
|
||||||
|
binding.tvAliPay.gone()
|
||||||
|
}
|
||||||
|
if (list?.find { it == "bank" } != null && globalPayType.find { it == "bank" } != null) {
|
||||||
|
binding.tvBankPay.visible()
|
||||||
|
} else {
|
||||||
|
binding.tvBankPay.gone()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (goodsEntity?.pay_type!!.startsWith("weixin") && binding.tvWxPay.isVisible) {
|
||||||
|
payType = 0
|
||||||
|
}
|
||||||
|
if (goodsEntity?.pay_type!!.startsWith("alipay") && binding.tvAliPay.isVisible) {
|
||||||
|
payType = 1
|
||||||
|
}
|
||||||
|
if (goodsEntity?.pay_type!!.startsWith("bank") && binding.tvBankPay.isVisible) {
|
||||||
|
payType = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
checkPayType()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun initPrivacyTv() {
|
||||||
|
val spanUtils = SpanUtils.with(binding.tvAgree)
|
||||||
|
.append("我已阅读并同意")
|
||||||
|
.append("《会员服务协议规则》")
|
||||||
|
.setClickSpan(getColor(R.color.color_a6e8f7), false) {
|
||||||
|
UrlHelper.startUserAgreement(requireContext(), "会员服务协议规则")
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(goodsEntity?.sign_value) && payType == 1) {
|
||||||
|
spanUtils.append("和")
|
||||||
|
spanUtils.append("《自动续费服务规则》")
|
||||||
|
spanUtils.setClickSpan(getColor(R.color.color_a6e8f7), false) {
|
||||||
|
UrlHelper.startRenewAgreement(requireContext())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spanUtils.create()
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
private fun setPrice(price: Float) {
|
||||||
|
totalPrice = if (price < 0) 0f else price
|
||||||
|
SpanUtils.with(binding.tvPrice)
|
||||||
|
.append("¥")
|
||||||
|
.setFontSize(12, true)
|
||||||
|
.append(DecimalFormat("0.##").format(totalPrice))
|
||||||
|
.append(formatPricePeriod(goodsEntity!!.value))
|
||||||
|
.setFontSize(12, true)
|
||||||
|
.create()
|
||||||
|
binding.tvSavedPrice.text = "已优惠${DecimalFormat("0.##").format(goodsEntity!!.origin_price.toFloat() - totalPrice)}"
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun formatPricePeriod(value: String): String {
|
||||||
|
if (value == "#") {
|
||||||
|
return "/终生"
|
||||||
|
} else if (value.endsWith("m")) {
|
||||||
|
val monthStr = value.replace("m", "")
|
||||||
|
if (!TextUtils.isEmpty(monthStr)) {
|
||||||
|
val month = monthStr.toInt()
|
||||||
|
return if (month >= 12) {
|
||||||
|
"/${if (month / 12 > 1) "${month / 12}" else ""}年"
|
||||||
|
} else if (month % 3 == 0) {
|
||||||
|
"/${if (month / 3 > 1) "${month / 3}" else ""}季"
|
||||||
|
} else {
|
||||||
|
"/${if (month > 1) "$month" else ""}月"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getDateList(dataList: List<GuideUpdateEntity>, selectedWeekTime: Long): ArrayList<String> {
|
||||||
|
val dateList = ArrayList<String>()
|
||||||
|
for (i in dataList.indices) {
|
||||||
|
dateList.add(DateUtils.getDayOfWeekTimeMillisByEndTime(selectedWeekTime, i + 1).getDD())
|
||||||
|
}
|
||||||
|
return dateList
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startCountdown() {
|
||||||
|
countdownDisposable = RxCountDown.countdown(totalSeconds)
|
||||||
|
.subscribe {
|
||||||
|
setCountdownTime(it)
|
||||||
|
if (it == 0L) {
|
||||||
|
val f = GuideSaleDialog.newInstance()
|
||||||
|
f.setOnSelectListener { seconds ->
|
||||||
|
totalSeconds = seconds
|
||||||
|
startCountdown()
|
||||||
|
}
|
||||||
|
f.show(childFragmentManager, GuideSaleDialog::class.java.simpleName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//格式化倒计时
|
||||||
|
private fun setCountdownTime(seconds: Long) {
|
||||||
|
val minutes = seconds / 60
|
||||||
|
val hours = minutes / 60
|
||||||
|
val day = hours / 24
|
||||||
|
binding.tvDay.text = String.format("%02d", day)
|
||||||
|
binding.tvHour.text = if (day > 0) String.format("%02d", hours % 24) else String.format("%02d", hours)
|
||||||
|
binding.tvMinute.text = String.format("%02d", minutes % 60)
|
||||||
|
binding.tvSecond.text = String.format("%02d", seconds % 60)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startScroll() {
|
||||||
|
if (userTipsList.isEmpty() || scrollTask != null) return
|
||||||
|
scrollTask = Observable.interval(300, 9, TimeUnit.MILLISECONDS)
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe {
|
||||||
|
if (activity != null) {
|
||||||
|
binding.rvUser.scrollBy(3, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun stopScroll() {
|
||||||
|
scrollTask?.dispose()
|
||||||
|
scrollTask = null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStart() {
|
||||||
|
startScroll()
|
||||||
|
super.onStart()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
stopScroll()
|
||||||
|
super.onStop()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
countdownDisposable?.dispose()
|
||||||
|
super.onDestroyView()
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("UnsafeOptInUsageError")
|
@SuppressLint("UnsafeOptInUsageError")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.cheng.blzb.ui.fragment.guide.vip
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.BaseAdapter
|
||||||
|
import android.widget.TextView
|
||||||
|
import com.cheng.blzb.R
|
||||||
|
import com.cheng.blzb.bean.HotWordEntity
|
||||||
|
import com.cheng.blzb.common.Constants
|
||||||
|
|
||||||
|
|
||||||
|
class GuideVipIndustryAdapter(val context: Context, val data: List<HotWordEntity.Child>): BaseAdapter() {
|
||||||
|
override fun getCount(): Int {
|
||||||
|
return data.size
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItem(position: Int): HotWordEntity.Child {
|
||||||
|
return data[position]
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemId(position: Int): Long {
|
||||||
|
return position.toLong()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
|
||||||
|
val view: View
|
||||||
|
val viewHolder: ViewHolder
|
||||||
|
if (convertView == null) {
|
||||||
|
view = View.inflate(context, R.layout.listitem_guide_vip_industry, null)
|
||||||
|
viewHolder = ViewHolder(view)
|
||||||
|
view.tag = viewHolder
|
||||||
|
} else {
|
||||||
|
view = convertView
|
||||||
|
viewHolder = convertView.tag as ViewHolder
|
||||||
|
}
|
||||||
|
viewHolder.tvName.typeface = Constants.ysbth
|
||||||
|
viewHolder.tvName.text = getItem(position).name
|
||||||
|
return view
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ViewHolder(val view: View) {
|
||||||
|
val tvName: TextView = view.findViewById(R.id.tv_name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.cheng.blzb.ui.fragment.guide.vip
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.view.ViewGroup.LayoutParams
|
||||||
|
import android.widget.ImageView
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import coil.load
|
||||||
|
import coil.transform.CircleCropTransformation
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.blzb.R
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
|
||||||
|
class GuideVipUserAdapter(val context: Context, val data: MutableList<String>): RecyclerView.Adapter<BaseViewHolder>() {
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||||
|
val view = View.inflate(context, R.layout.listitem_guide_vip_user, null)
|
||||||
|
val lp = ConstraintLayout.LayoutParams(LayoutParams.WRAP_CONTENT, DensityUtils.dp2px(24f))
|
||||||
|
lp.leftMargin = DensityUtils.dp2px(10f)
|
||||||
|
view.layoutParams = lp
|
||||||
|
return BaseViewHolder(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("DiscouragedApi")
|
||||||
|
override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
|
||||||
|
holder.getView<ImageView>(R.id.iv_avatar).load(context.resources.getIdentifier("yq_${position % 51}", "mipmap", context.packageName)) {
|
||||||
|
transformations(CircleCropTransformation())
|
||||||
|
}
|
||||||
|
holder.setText(R.id.tv_content, data[position % data.size])
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return if (data.isNotEmpty()) Int.MAX_VALUE else 0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
package com.cheng.blzb.ui.fragment.guide.vip
|
package com.cheng.blzb.ui.fragment.guide.vip
|
||||||
|
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import com.cheng.blzb.bean.AreaEntity
|
|
||||||
import com.cheng.blzb.bean.GuideTotalBidEntity
|
|
||||||
import com.cheng.blzb.bean.GuideUpdateEntity
|
import com.cheng.blzb.bean.GuideUpdateEntity
|
||||||
import com.cheng.blzb.bean.HotWordEntity
|
import com.cheng.blzb.bean.OrderPayEntity
|
||||||
|
import com.cheng.blzb.bean.VipGoodsEntity
|
||||||
import com.cheng.blzb.net.ApiFactory
|
import com.cheng.blzb.net.ApiFactory
|
||||||
import com.example.base.extensions.toast
|
import com.example.base.extensions.toast
|
||||||
import com.example.base.utils.L
|
import com.example.base.utils.L
|
||||||
import com.example.base.viewmodel.BaseViewModel
|
import com.example.base.viewmodel.BaseViewModel
|
||||||
|
import com.google.gson.JsonObject
|
||||||
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
|
|
||||||
class GuideVipViewModel: BaseViewModel() {
|
class GuideVipViewModel: BaseViewModel() {
|
||||||
val hotWordLiveData = MutableLiveData<List<HotWordEntity>>()
|
val goodsListLiveData = MutableLiveData<List<VipGoodsEntity>>()
|
||||||
val cityLiveData = MutableLiveData<List<AreaEntity>>()
|
val createOrderLiveData = MutableLiveData<OrderPayEntity>()
|
||||||
val userCityLiveData = MutableLiveData<AreaEntity>()
|
val payTipsLiveData = MutableLiveData<List<String>>()
|
||||||
val totalLiveData = MutableLiveData<GuideTotalBidEntity>()
|
|
||||||
val updateLiveData = MutableLiveData<List<GuideUpdateEntity>>()
|
val updateLiveData = MutableLiveData<List<GuideUpdateEntity>>()
|
||||||
|
|
||||||
fun getHotWordList() {
|
fun getGoodsList() {
|
||||||
launchOnUiTryCatch({
|
launchOnUiTryCatch({
|
||||||
val response = ApiFactory.apiService.getHotWordList()
|
val response = ApiFactory.apiService.getGoodsList()
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
hotWordLiveData.postValue(response.data)
|
goodsListLiveData.postValue(response.data)
|
||||||
} else toast(response.message, true)
|
} else toast(response.message, true)
|
||||||
}, {
|
}, {
|
||||||
setError(it)
|
setError(it)
|
||||||
|
|
@ -29,36 +29,35 @@ class GuideVipViewModel: BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCityList() {
|
fun payCreateOrder(goodsId: String, payType: String) {
|
||||||
|
showDialog()
|
||||||
launchOnUiTryCatch({
|
launchOnUiTryCatch({
|
||||||
val response = ApiFactory.apiService.getAreaList()
|
val json = JsonObject()
|
||||||
|
json.addProperty("goods_id", goodsId)
|
||||||
|
json.addProperty("pay_type", payType)
|
||||||
|
json.addProperty("source", "bootpage")
|
||||||
|
json.addProperty("pay_source", "app")
|
||||||
|
|
||||||
|
val response = ApiFactory.apiService.payCreateOrder(json.toString().toRequestBody())
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
cityLiveData.postValue(response.data)
|
createOrderLiveData.postValue(response.data)
|
||||||
} else toast(response.message, true)
|
} else {
|
||||||
|
toast(response.message, true)
|
||||||
|
}
|
||||||
|
dismissDialog()
|
||||||
}, {
|
}, {
|
||||||
|
dismissDialog()
|
||||||
setError(it)
|
setError(it)
|
||||||
L.d(it)
|
L.d(it)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getUserCity() {
|
fun getPayUserTips() {
|
||||||
launchOnUiTryCatch({
|
launchOnUiTryCatch({
|
||||||
val response = ApiFactory.apiService.getUserCity()
|
val response = ApiFactory.apiService.getPayUserTips()
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
userCityLiveData.postValue(response.data)
|
payTipsLiveData.postValue(response.data)
|
||||||
} else toast(response.message, true)
|
}
|
||||||
}, {
|
|
||||||
setError(it)
|
|
||||||
L.d(it)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getTotalBidInfo(keywords: String, cityIds: String, kindNum: String) {
|
|
||||||
launchOnUiTryCatch({
|
|
||||||
val response = ApiFactory.apiService.getTotalBidInfo(keywords, cityIds, kindNum)
|
|
||||||
if (response.status) {
|
|
||||||
totalLiveData.postValue(response.data)
|
|
||||||
} else toast(response.message, true)
|
|
||||||
}, {
|
}, {
|
||||||
setError(it)
|
setError(it)
|
||||||
L.d(it)
|
L.d(it)
|
||||||
|
|
@ -67,7 +66,7 @@ class GuideVipViewModel: BaseViewModel() {
|
||||||
|
|
||||||
fun getUpdateNum() {
|
fun getUpdateNum() {
|
||||||
launchOnUiTryCatch({
|
launchOnUiTryCatch({
|
||||||
val response = ApiFactory.apiService.getUpdateNum("8")
|
val response = ApiFactory.apiService.getUpdateNum("7")
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
updateLiveData.postValue(response.data)
|
updateLiveData.postValue(response.data)
|
||||||
} else toast(response.message, true)
|
} else toast(response.message, true)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
package com.cheng.blzb.widget
|
||||||
|
|
||||||
|
import android.animation.ValueAnimator
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import android.view.View
|
||||||
|
import android.widget.FrameLayout
|
||||||
|
import android.widget.ImageView
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.core.animation.addListener
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.blzb.R
|
||||||
|
import com.example.base.extensions.visible
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
import java.text.DecimalFormat
|
||||||
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
|
class BarChartView @JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
attrs: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : FrameLayout(context, attrs, defStyleAttr) {
|
||||||
|
private val xAxisAdapter by lazy { XAxisAdapter() }
|
||||||
|
|
||||||
|
private val yAxisAdapter by lazy { YAxisAdapter() }
|
||||||
|
|
||||||
|
private val yAxisRowCount = 6
|
||||||
|
|
||||||
|
private var maxValue = 0f
|
||||||
|
|
||||||
|
init {
|
||||||
|
val view = inflate(context, R.layout.layout_bar_chart, null)
|
||||||
|
addView(view, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||||
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||||
|
|
||||||
|
val rvX = findViewById<RecyclerView>(R.id.rv_x)
|
||||||
|
rvX.adapter = xAxisAdapter
|
||||||
|
|
||||||
|
val rvY = findViewById<RecyclerView>(R.id.rv_y)
|
||||||
|
rvY.adapter = yAxisAdapter
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setData(xValueList: List<XAxisValue>) {
|
||||||
|
val yValueList = mutableListOf<YAxisValue>()
|
||||||
|
val rowValue = xValueList.maxBy { it.value }.value / yAxisRowCount
|
||||||
|
val value = if (rowValue > 10) {
|
||||||
|
var bigNum = rowValue.toInt().toFloat()
|
||||||
|
val numLength = rowValue.toInt().toString().length
|
||||||
|
for (i in 0 until numLength - 1) {
|
||||||
|
bigNum /= 10
|
||||||
|
}
|
||||||
|
bigNum = (bigNum + 0.5f).roundToInt().toFloat()
|
||||||
|
for (i in 0 until numLength - 1) {
|
||||||
|
bigNum *= 10
|
||||||
|
}
|
||||||
|
bigNum
|
||||||
|
} else rowValue
|
||||||
|
|
||||||
|
for (i in 0 .. yAxisRowCount) {
|
||||||
|
yValueList.add(0, YAxisValue(i * value))
|
||||||
|
}
|
||||||
|
maxValue = value * yAxisRowCount
|
||||||
|
|
||||||
|
xAxisAdapter.setList(xValueList)
|
||||||
|
yAxisAdapter.setList(yValueList)
|
||||||
|
}
|
||||||
|
|
||||||
|
data class XAxisValue(val value: Float, val date: String)
|
||||||
|
|
||||||
|
data class YAxisValue(val value: Float)
|
||||||
|
|
||||||
|
inner class XAxisAdapter : BaseQuickAdapter<XAxisValue, BaseViewHolder>(R.layout.listitem_bar_chart_x) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: XAxisValue) {
|
||||||
|
holder.setText(R.id.tv_value, "${DecimalFormat("0.#").format(item.value)}")
|
||||||
|
holder.setText(R.id.tv_date, item.date)
|
||||||
|
|
||||||
|
val lp = holder.getView<ImageView>(R.id.iv_bar).layoutParams as ConstraintLayout.LayoutParams
|
||||||
|
lp.height = (item.value / maxValue * recyclerView.measuredHeight * yAxisRowCount / (yAxisRowCount + 1)).toInt() - DensityUtils.dp2px(6f)
|
||||||
|
(holder.getView<ImageView>(R.id.iv_bar)).layoutParams = lp
|
||||||
|
// startAnim(holder.getView(R.id.iv_bar), item)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startAnim(barView: View, item: XAxisValue) {
|
||||||
|
val valueAnim = ValueAnimator.ofFloat(0f, 1f)
|
||||||
|
valueAnim.addUpdateListener { animator ->
|
||||||
|
val value = animator.animatedValue as Float
|
||||||
|
val itemHeight = (item.value / maxValue * recyclerView.measuredHeight * yAxisRowCount / (yAxisRowCount + 1)).toInt() - DensityUtils.dp2px(6f)
|
||||||
|
val lp = barView.layoutParams as ConstraintLayout.LayoutParams
|
||||||
|
lp.height = (value * itemHeight).toInt()
|
||||||
|
barView.layoutParams = lp
|
||||||
|
}
|
||||||
|
valueAnim.addListener(onStart = {
|
||||||
|
barView.visible()
|
||||||
|
})
|
||||||
|
valueAnim.duration = 1000
|
||||||
|
valueAnim.start()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class YAxisAdapter() : BaseQuickAdapter<YAxisValue, BaseViewHolder>(R.layout.listitem_bar_chart_y) {
|
||||||
|
|
||||||
|
override fun convert(holder: BaseViewHolder, item: YAxisValue) {
|
||||||
|
val lp = holder.itemView.layoutParams as RecyclerView.LayoutParams
|
||||||
|
lp.height = recyclerView.measuredHeight / (yAxisRowCount + 1)
|
||||||
|
holder.itemView.layoutParams = lp
|
||||||
|
|
||||||
|
holder.setText(R.id.tv_value, "${DecimalFormat("0.#").format(item.value)}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#FF8929" />
|
||||||
|
<corners android:radius="@dimen/dp_4" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="@dimen/dp_4" />
|
||||||
|
<gradient
|
||||||
|
android:angle="270"
|
||||||
|
android:endColor="#61D0FC"
|
||||||
|
android:startColor="#FFFFFF" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<corners android:radius="@dimen/dp_25"/>
|
||||||
|
<solid android:color="#00091A"/>
|
||||||
|
</shape>
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="#F3453C" />
|
<solid android:color="#F3453C" />
|
||||||
<corners
|
<corners android:radius="@dimen/dp_3" />
|
||||||
android:bottomRightRadius="@dimen/dp_8"
|
|
||||||
android:topLeftRadius="@dimen/dp_8" />
|
|
||||||
</shape>
|
</shape>
|
||||||
|
|
@ -0,0 +1,264 @@
|
||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_bg1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_guide_sale_dialog_bg1"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="w,1473:1691"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_content"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="350dp"
|
||||||
|
android:layout_marginStart="@dimen/dp_50"
|
||||||
|
android:layout_marginEnd="@dimen/dp_50"
|
||||||
|
android:background="@mipmap/ic_guide_sale_dialog_bg2"
|
||||||
|
android:paddingStart="@dimen/dp_14"
|
||||||
|
android:paddingEnd="@dimen/dp_14"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="h,906:1067"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_countdown_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_30"
|
||||||
|
android:layout_marginTop="@dimen/dp_40"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_hour"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:background="@drawable/shape_ff8929_cor4"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="00"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="时"
|
||||||
|
android:textColor="@color/color_202020"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_minute"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:background="@drawable/shape_ff8929_cor4"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="00"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="分"
|
||||||
|
android:textColor="@color/color_202020"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_second"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:background="@drawable/shape_ff8929_cor4"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="01"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="秒"
|
||||||
|
android:textColor="@color/color_202020"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_end_tip1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:layout_marginTop="@dimen/dp_82"
|
||||||
|
android:text="限时活动即将结束"
|
||||||
|
android:textColor="#D17717"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_end_tip2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_3"
|
||||||
|
android:text="马上回归原价"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_18"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_end_tip1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_end_tip1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_end_tip3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_2"
|
||||||
|
android:text="一次购买,终身免费"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_end_tip1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_end_tip2" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_origin_price"
|
||||||
|
android:layout_width="106dp"
|
||||||
|
android:layout_height="69dp"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:background="@mipmap/ic_guide_sale_dialog_bg5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingEnd="@dimen/dp_12"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/layout_price"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_origin_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="2398"
|
||||||
|
android:textColor="#497BE2"
|
||||||
|
android:textSize="@dimen/sp_26" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="终身会员"
|
||||||
|
android:textColor="#071B44"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_price"
|
||||||
|
android:layout_width="142dp"
|
||||||
|
android:layout_height="95dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:background="@mipmap/ic_guide_sale_dialog_bg4"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_end_tip3">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="398"
|
||||||
|
android:textColor="#FF1818"
|
||||||
|
android:textSize="36sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="终身会员"
|
||||||
|
android:textColor="#631010"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_icon4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="-30dp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:src="@mipmap/ic_guide_sale_dialog_icon4"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/layout_origin_price"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/layout_price"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/layout_origin_price" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_icon3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_5"
|
||||||
|
android:src="@mipmap/ic_guide_sale_dialog_icon3"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_end_tip1" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_46"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:background="@mipmap/ic_guide_sale_dialog_btn"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="考虑300秒"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_price" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_icon1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="-14dp"
|
||||||
|
android:layout_marginTop="87dp"
|
||||||
|
android:src="@mipmap/ic_guide_sale_dialog_icon1"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/layout_content"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/layout_content" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_icon2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="-42dp"
|
||||||
|
android:layout_marginBottom="@dimen/dp_30"
|
||||||
|
android:src="@mipmap/ic_guide_sale_dialog_icon2"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/layout_content"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/layout_content" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/dp_30"
|
||||||
|
android:layout_marginBottom="@dimen/dp_80"
|
||||||
|
android:layout_marginEnd="@dimen/dp_14"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/layout_content"
|
||||||
|
android:src="@mipmap/ic_guide_sale_dialog_bg3"
|
||||||
|
app:layout_constraintDimensionRatio="h,1085:378"
|
||||||
|
android:layout_height="0dp"/>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -1,31 +1,718 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<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_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
android:background="@mipmap/ic_guide_vip_bg">
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
android:fillViewport="true">
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
android:fillViewport="true"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/layout_pay_btn"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@mipmap/ic_guide_vip_bg">
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_user"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_70"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:listitem="@layout/listitem_guide_vip_user"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_industry"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/rv_user"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_industry_bg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="-12dp"
|
||||||
|
android:src="@mipmap/ic_guide_vip_industry_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/viewFlipper" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_industry_pre"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_18"
|
||||||
|
android:text="已为您找到"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/viewFlipper"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/viewFlipper" />
|
||||||
|
|
||||||
|
<AdapterViewFlipper
|
||||||
|
android:id="@+id/viewFlipper"
|
||||||
|
android:layout_width="@dimen/dp_150"
|
||||||
|
android:layout_height="@dimen/dp_50"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:autoStart="true"
|
||||||
|
android:flipInterval="500"
|
||||||
|
android:inAnimation="@animator/anim_vf_in"
|
||||||
|
android:loopViews="true"
|
||||||
|
android:outAnimation="@animator/anim_vf_out"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_industry_suf"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_18"
|
||||||
|
android:text="以下相关数据"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/viewFlipper"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/viewFlipper" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_tab"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_industry"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tab1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@mipmap/ic_guide_vip_tab_checked"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="总计商机"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tab2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@mipmap/ic_guide_vip_tab_default"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="每日更新"
|
||||||
|
android:textColor="@color/color_9bbbdf"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tab3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@mipmap/ic_guide_vip_tab_default"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="数据类型"
|
||||||
|
android:textColor="@color/color_9bbbdf"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tab4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@mipmap/ic_guide_vip_tab_default"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="地区规模"
|
||||||
|
android:textColor="@color/color_9bbbdf"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_info"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_tab"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_total_info"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@mipmap/ic_guide_vip_info_bg"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_total_info1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/layout_total_info2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_total_info_icon1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_guide_vip_total_info_icon1"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_count1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:text="43925条"
|
||||||
|
android:textSize="@dimen/sp_20"
|
||||||
|
app:gradient_endColor="@color/color_6dd9f2"
|
||||||
|
app:gradient_startColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_total_info_title1"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_total_info_icon1"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_total_info_icon1" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_title1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
|
android:text="相关商机"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:gradient_endColor="@color/color_05ace8"
|
||||||
|
app:gradient_startColor="@color/color_20f3e6"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_total_info_icon1"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_total_info_count1"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_total_info_count1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_total_info_count1" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_total_info2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/layout_total_info1"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_total_info_icon2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_guide_vip_total_info_icon2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_count2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:text="43925条"
|
||||||
|
android:textSize="@dimen/sp_20"
|
||||||
|
app:gradient_endColor="@color/color_6dd9f2"
|
||||||
|
app:gradient_startColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_total_info_title2"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_total_info_icon2"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_total_info_icon2" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_title2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
|
android:text="联系甲方"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:gradient_endColor="@color/color_05ace8"
|
||||||
|
app:gradient_startColor="@color/color_20f3e6"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_total_info_icon2"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_total_info_count2"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_total_info_count2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_total_info_count2" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_total_info3"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/layout_total_info2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_total_info1">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_total_info_icon3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_guide_vip_total_info_icon3"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_count3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:text="43925条"
|
||||||
|
android:textSize="@dimen/sp_20"
|
||||||
|
app:gradient_endColor="@color/color_6dd9f2"
|
||||||
|
app:gradient_startColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_total_info_title3"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_total_info_icon3"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_total_info_icon3" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_title3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
|
android:text="交易规模"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:gradient_endColor="@color/color_05ace8"
|
||||||
|
app:gradient_startColor="@color/color_20f3e6"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_total_info_icon3"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_total_info_count3"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_total_info_count3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_total_info_count3" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_total_info4"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_12"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/layout_total_info3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_total_info2">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_total_info_icon4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_guide_vip_total_info_icon4"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_count4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:text="43925条"
|
||||||
|
android:textSize="@dimen/sp_20"
|
||||||
|
app:gradient_endColor="@color/color_6dd9f2"
|
||||||
|
app:gradient_startColor="@color/white"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_total_info_title4"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_total_info_icon4"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_total_info_icon4" />
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_total_info_title4"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
|
android:text="昨日更新"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:gradient_endColor="@color/color_05ace8"
|
||||||
|
app:gradient_startColor="@color/color_20f3e6"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_total_info_icon4"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_total_info_count4"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_total_info_count4"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_total_info_count4" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_chart"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@mipmap/ic_guide_vip_info_bg"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_chart_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="月份:12月 单位:条"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.cheng.blzb.widget.BarChartView
|
||||||
|
android:id="@+id/barChart"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_280"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_chart_title" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_info_light1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_48"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:layout_marginBottom="-30dp"
|
||||||
|
android:src="@mipmap/ic_guide_vip_info_line"
|
||||||
|
app:layout_constraintBottom_toTopOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_info_light2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_48"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginTop="-34dp"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:src="@mipmap/ic_guide_vip_info_line"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_countdown"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_info"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="新人优惠结束"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_day"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:background="@drawable/shape_guide_vip_time_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="00"
|
||||||
|
android:textColor="@color/color_04214f"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="天"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_hour"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:background="@drawable/shape_guide_vip_time_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="00"
|
||||||
|
android:textColor="@color/color_04214f"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="时"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_minute"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:background="@drawable/shape_guide_vip_time_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="00"
|
||||||
|
android:textColor="@color/color_04214f"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="分"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_second"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_20"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:background="@drawable/shape_guide_vip_time_bg"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="00"
|
||||||
|
android:textColor="@color/color_04214f"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="秒"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_goods"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_countdown"
|
||||||
|
tools:itemCount="3"
|
||||||
|
tools:listitem="@layout/listitem_guide_vip_goods"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_pay"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/rv_goods"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:background="@mipmap/ic_guide_vip_info_bg"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_wx_pay"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_60"
|
||||||
|
android:drawableStart="@mipmap/ic_wx_pay"
|
||||||
|
android:drawableEnd="@mipmap/ic_guide_pay_default"
|
||||||
|
android:drawablePadding="@dimen/dp_10"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="微信支付"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="#1AFFFFFF"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_wx_pay" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_ali_pay"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_60"
|
||||||
|
android:drawableStart="@mipmap/ic_ali_pay"
|
||||||
|
android:drawableEnd="@mipmap/ic_guide_pay_checked"
|
||||||
|
android:drawablePadding="@dimen/dp_10"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="支付宝支付"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_wx_pay" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="#1AFFFFFF"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_ali_pay" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bank_pay"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_60"
|
||||||
|
android:drawableStart="@mipmap/ic_transfer_pay"
|
||||||
|
android:drawableEnd="@mipmap/ic_guide_pay_default"
|
||||||
|
android:drawablePadding="@dimen/dp_10"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="对公转账"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_ali_pay" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="#1AFFFFFF"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_bank_pay" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/cb_agree"
|
||||||
|
android:layout_width="@dimen/dp_18"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
android:background="@null"
|
||||||
|
android:button="@null"
|
||||||
|
android:drawableStart="@drawable/selector_default_check"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_bank_pay" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_agree"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:text="我已阅读并同意《会员服务协议规则》和《自动续费服务规则》"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/cb_agree"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/cb_agree" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_48"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginBottom="-30dp"
|
||||||
|
android:src="@mipmap/ic_guide_vip_info_line"
|
||||||
|
app:layout_constraintBottom_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_48"
|
||||||
|
android:layout_marginTop="-34dp"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:src="@mipmap/ic_guide_vip_info_line"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_pay_btn"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:layout_marginBottom="@dimen/dp_15"
|
||||||
|
android:background="@mipmap/ic_guide_vip_btn_bg"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="h,343:46"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_price"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintWidth_percent="0.588">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingStart="@dimen/dp_10"
|
||||||
|
android:text="¥398"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_24"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_invoice"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:text="(可开发票)"
|
||||||
|
android:textColor="@color/color_a6e8f7"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_invoice"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_price"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_saved_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
|
android:text="已优惠2000"
|
||||||
|
android:textColor="@color/color_a6e8f7"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_invoice"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_invoice" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_pay"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="立即订阅"
|
||||||
|
android:textColor="#04214F"
|
||||||
|
android:textSize="@dimen/sp_18"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/layout_price" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_close"
|
android:id="@+id/iv_close"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
android:layout_marginTop="@dimen/dp_35"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_60"
|
android:src="@mipmap/ic_guide_vip_close"
|
||||||
android:src="@mipmap/ic_guide_vip_close" />
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:visibility="visible" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?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="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_y"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="@dimen/dp_15"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/listitem_bar_chart_y" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_x"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="@dimen/dp_50"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:spanCount="7"
|
||||||
|
tools:listitem="@layout/listitem_bar_chart_x" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_value"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_10"
|
||||||
|
android:text="14235"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/iv_bar"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="@dimen/dp_6"
|
||||||
|
android:layout_marginBottom="-3dp"
|
||||||
|
android:src="@mipmap/ic_bar_chart_top"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/iv_bar"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/iv_bar"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/iv_bar" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_bar"
|
||||||
|
android:layout_width="@dimen/dp_20"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_5"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/ic_bar_chart"
|
||||||
|
android:visibility="visible"
|
||||||
|
tools:visibility="visible"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_date"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_date"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="08日"
|
||||||
|
android:textColor="#8194AF"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?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"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_value"
|
||||||
|
android:layout_width="@dimen/dp_40"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="30000"
|
||||||
|
android:textColor="#8194AF"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="0.5dp"
|
||||||
|
android:background="#446998"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_value"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_value"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_value" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
<?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"
|
||||||
|
android:id="@+id/root"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_3"
|
||||||
|
android:layout_marginBottom="@dimen/dp_3"
|
||||||
|
android:background="@mipmap/ic_guide_vip_goods_checked"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="h,100:104"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<com.flyjingfish.gradienttextviewlib.GradientTextView
|
||||||
|
android:id="@+id/tv_goods_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="月度会员"
|
||||||
|
android:textSize="@dimen/sp_20"
|
||||||
|
app:gradient_angle="270"
|
||||||
|
app:gradient_endColor="#05ACE8"
|
||||||
|
app:gradient_startColor="#20F3E6" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="25"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_34"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_origin_price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:text="¥39"
|
||||||
|
android:textColor="@color/color_a6acb5"
|
||||||
|
android:textSize="@dimen/sp_10" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tag"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="-3dp"
|
||||||
|
android:background="@drawable/shape_vip_tag_bg"
|
||||||
|
android:drawableStart="@mipmap/ic_guide_vip_fire"
|
||||||
|
android:drawablePadding="@dimen/dp_1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="@dimen/dp_6"
|
||||||
|
android:paddingTop="@dimen/dp_2"
|
||||||
|
android:paddingEnd="@dimen/dp_6"
|
||||||
|
android:paddingBottom="@dimen/dp_2"
|
||||||
|
android:text="限时优惠"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/layout_content"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/layout_content"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/layout_content" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="重庆市"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_34" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?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"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_24"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
|
android:background="@drawable/shape_guide_vip_user_bg"
|
||||||
|
android:paddingStart="@dimen/dp_10"
|
||||||
|
android:paddingEnd="@dimen/dp_10">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_avatar"
|
||||||
|
android:layout_width="@dimen/dp_18"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:src="@mipmap/ic_default_avatar"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:text="恭喜 白芷 够买了 终身会员"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 874 B |
|
After Width: | Height: | Size: 602 B |
|
After Width: | Height: | Size: 428 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 984 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 402 B |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
|
@ -127,4 +127,12 @@
|
||||||
<color name="color_ff9234">#FF9234</color>
|
<color name="color_ff9234">#FF9234</color>
|
||||||
<color name="color_e3fae7">#E3FAE7</color>
|
<color name="color_e3fae7">#E3FAE7</color>
|
||||||
<color name="color_ffede7">#FFEDE7</color>
|
<color name="color_ffede7">#FFEDE7</color>
|
||||||
|
<color name="color_9bbbdf">#9BBBDF</color>
|
||||||
|
<color name="color_04214f">#04214F</color>
|
||||||
|
<color name="color_a6acb5">#A6ACB5</color>
|
||||||
|
<color name="color_a6e8f7">#A6E8F7</color>
|
||||||
|
<color name="color_202020">#202020</color>
|
||||||
|
<color name="color_20f3e6">#20F3E6</color>
|
||||||
|
<color name="color_05ace8">#05ACE8</color>
|
||||||
|
<color name="color_6dd9f2">#6DD9F2</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -92,5 +92,6 @@
|
||||||
<dimen name="dp_66">66dp</dimen>
|
<dimen name="dp_66">66dp</dimen>
|
||||||
<dimen name="dp_190">190dp</dimen>
|
<dimen name="dp_190">190dp</dimen>
|
||||||
<dimen name="dp_180">180dp</dimen>
|
<dimen name="dp_180">180dp</dimen>
|
||||||
|
<dimen name="dp_280">280dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -118,6 +118,11 @@ fun Long.getHHMM(): String {
|
||||||
return dateFormat.format(this)
|
return dateFormat.format(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Long.getDD(): String {
|
||||||
|
val dateFormat = SimpleDateFormat("dd日", Locale.CHINA)
|
||||||
|
return dateFormat.format(this)
|
||||||
|
}
|
||||||
|
|
||||||
fun Long.getYYYYMMDDHHMM(format: String): String {
|
fun Long.getYYYYMMDDHHMM(format: String): String {
|
||||||
val dateFormat = SimpleDateFormat(format, Locale.CHINA)
|
val dateFormat = SimpleDateFormat(format, Locale.CHINA)
|
||||||
return dateFormat.format(this)
|
return dateFormat.format(this)
|
||||||
|
|
|
||||||