添加快报版引导页支付(差柱状图样式)
This commit is contained in:
parent
95ffe05bc5
commit
8d4f86ccde
|
|
@ -78,7 +78,7 @@ class GuideItem5KBFragment : BaseFragment<FragmentGuideItem5KbBinding, GuideKBVi
|
|||
|
||||
SpanUtils.with(binding.tvCount)
|
||||
.append("${totalInfo?.bidCount}")
|
||||
.appendSpace(DensityUtils.dp2px(5f))
|
||||
.appendSpace(DensityUtils.dp2px(3f))
|
||||
.append("条")
|
||||
.setFontSize(10, true)
|
||||
.create()
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import android.animation.AnimatorSet
|
|||
import android.animation.ObjectAnimator
|
||||
import android.animation.ValueAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.os.Build
|
||||
import android.text.TextUtils
|
||||
import android.view.View
|
||||
|
|
@ -25,7 +26,6 @@ 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.FragmentGuideVipKbBinding
|
||||
import com.cheng.blzb.event.OrderEvent
|
||||
import com.cheng.blzb.event.PayStatusEnum
|
||||
|
|
@ -39,15 +39,12 @@ 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.dialog.TipDialog
|
||||
import com.cheng.blzb.ui.fragment.guide.vip.GuideVipGoodsAdapter
|
||||
import com.cheng.blzb.ui.fragment.guide.vip.GuideVipIndustryAdapter
|
||||
import com.cheng.blzb.ui.fragment.guide.vip.GuideVipUserAdapter
|
||||
import com.cheng.blzb.ui.fragment.guide.vip.GuideVipViewModel
|
||||
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.cheng.blzb.widget.BarChartKBView
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.common.RxCountDown
|
||||
import com.example.base.decoration.SpacesItemDecoration
|
||||
|
|
@ -55,7 +52,6 @@ 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.setStatusBarLight
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
|
|
@ -73,7 +69,6 @@ import org.jetbrains.anko.sdk27.listeners.onCheckedChange
|
|||
import org.jetbrains.anko.sdk27.listeners.onTouch
|
||||
import org.jetbrains.anko.startActivity
|
||||
import java.text.DecimalFormat
|
||||
import java.util.Calendar
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class GuideVipKBFragment: BaseFragment<FragmentGuideVipKbBinding, GuideVipViewModel>() {
|
||||
|
|
@ -126,7 +121,6 @@ class GuideVipKBFragment: BaseFragment<FragmentGuideVipKbBinding, GuideVipViewMo
|
|||
binding.cbAgree.visibility = if (UserConfigManager.isPayAgreementEnable()) View.VISIBLE else View.GONE
|
||||
binding.tvAgree.visibility = if (UserConfigManager.isPayAgreementEnable()) View.VISIBLE else View.GONE
|
||||
|
||||
binding.tvChartTitle.text = "月份:${Calendar.getInstance().get(Calendar.MONTH) + 1}月 单位:条"
|
||||
|
||||
binding.layoutContent.viewTreeObserver.addOnGlobalLayoutListener(object : OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
|
|
@ -417,9 +411,9 @@ class GuideVipKBFragment: BaseFragment<FragmentGuideVipKbBinding, GuideVipViewMo
|
|||
|
||||
private fun setDailyChartData() {
|
||||
val dateList = getDateList(updateInfoList, System.currentTimeMillis())
|
||||
val dataList = mutableListOf<BarChartView.BarDataSet>()
|
||||
val dataList = mutableListOf<BarChartKBView.BarDataSet>()
|
||||
updateInfoList.forEachIndexed { index, item ->
|
||||
dataList.add(BarChartView.BarDataSet(dateList[index], listOf(item.count.toFloat())))
|
||||
dataList.add(BarChartKBView.BarDataSet(dateList[index], listOf(item.count.toFloat())))
|
||||
}
|
||||
binding.barChart.setData(dataList)
|
||||
binding.tvLegend1.gone()
|
||||
|
|
@ -430,9 +424,9 @@ class GuideVipKBFragment: BaseFragment<FragmentGuideVipKbBinding, GuideVipViewMo
|
|||
totalInfo?.let {
|
||||
val percentArray = intArrayOf(4, 6, 34, 5, 28, 7, 45, 1)
|
||||
val bidTypeArray = arrayOf("竞争性磋商", "更正公告", "招标公告", "招标计划", "采购公告", "合同公告", "中标公告", "终止公告")
|
||||
val dataList = mutableListOf<BarChartView.BarDataSet>()
|
||||
val dataList = mutableListOf<BarChartKBView.BarDataSet>()
|
||||
bidTypeArray.forEachIndexed { index, item ->
|
||||
dataList.add(BarChartView.BarDataSet(item, listOf((it.bidCount * percentArray[index] / 100).toFloat())))
|
||||
dataList.add(BarChartKBView.BarDataSet(item, listOf((it.bidCount * percentArray[index] / 100).toFloat())))
|
||||
}
|
||||
binding.barChart.setData(dataList)
|
||||
binding.tvLegend1.gone()
|
||||
|
|
@ -449,9 +443,9 @@ class GuideVipKBFragment: BaseFragment<FragmentGuideVipKbBinding, GuideVipViewMo
|
|||
14467, 9491, 7524, 6651, 6036, 5505, 4962, 4584, 4397, 3982, 3609, 3472, 3295, 3157, 3103,
|
||||
3078, 1907, 1803, 1690, 1555, 1421, 1128, 892, 758, 731, 708, 525, 525, 436, 328, 254
|
||||
)
|
||||
val dataList = mutableListOf<BarChartView.BarDataSet>()
|
||||
val dataList = mutableListOf<BarChartKBView.BarDataSet>()
|
||||
UserConfigManager.getCityList().forEachIndexed { index, item ->
|
||||
dataList.add(BarChartView.BarDataSet(item.name, listOf(array1[index].toFloat(), array2[index].toFloat())))
|
||||
dataList.add(BarChartKBView.BarDataSet(item.name, listOf(array1[index].toFloat(), array2[index].toFloat())))
|
||||
}
|
||||
binding.barChart.setData(dataList)
|
||||
binding.tvLegend1.visible()
|
||||
|
|
@ -549,18 +543,18 @@ class GuideVipKBFragment: BaseFragment<FragmentGuideVipKbBinding, GuideVipViewMo
|
|||
}
|
||||
|
||||
private fun updateTabStyle(textView: TextView) {
|
||||
binding.tvTab1.setTextColor(getColor(R.color.color_9bbbdf))
|
||||
binding.tvTab2.setTextColor(getColor(R.color.color_9bbbdf))
|
||||
binding.tvTab3.setTextColor(getColor(R.color.color_9bbbdf))
|
||||
binding.tvTab4.setTextColor(getColor(R.color.color_9bbbdf))
|
||||
binding.tvTab1.setTextColor(getColor(R.color.color_6c6c6c))
|
||||
binding.tvTab2.setTextColor(getColor(R.color.color_6c6c6c))
|
||||
binding.tvTab3.setTextColor(getColor(R.color.color_6c6c6c))
|
||||
binding.tvTab4.setTextColor(getColor(R.color.color_6c6c6c))
|
||||
|
||||
binding.tvTab1.setBackgroundResource(R.mipmap.ic_guide_vip_tab_default)
|
||||
binding.tvTab2.setBackgroundResource(R.mipmap.ic_guide_vip_tab_default)
|
||||
binding.tvTab3.setBackgroundResource(R.mipmap.ic_guide_vip_tab_default)
|
||||
binding.tvTab4.setBackgroundResource(R.mipmap.ic_guide_vip_tab_default)
|
||||
binding.tvTab1.setBackgroundResource(Color.TRANSPARENT)
|
||||
binding.tvTab2.setBackgroundResource(Color.TRANSPARENT)
|
||||
binding.tvTab3.setBackgroundResource(Color.TRANSPARENT)
|
||||
binding.tvTab4.setBackgroundResource(Color.TRANSPARENT)
|
||||
|
||||
textView.setTextColor(getColor(R.color.white))
|
||||
textView.setBackgroundResource(R.mipmap.ic_guide_vip_tab_checked)
|
||||
textView.setBackgroundResource(R.drawable.shape_guide_vip_kb_tab_checked)
|
||||
|
||||
val infoRotateAnim = ObjectAnimator.ofFloat(binding.layoutInfo, "rotationX", 90f, -10f, 10f, 0f)
|
||||
infoRotateAnim.duration = 1000
|
||||
|
|
|
|||
|
|
@ -0,0 +1,142 @@
|
|||
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 android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.animation.addListener
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
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 BarChartKBView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr) {
|
||||
private val xAxisAdapter by lazy { XAxisAdapter() }
|
||||
|
||||
private val xAxisColumnCount = 6
|
||||
|
||||
private val yAxisRowCount = 6
|
||||
|
||||
private var maxYAxisValue = 0f
|
||||
|
||||
init {
|
||||
initXAxisData()
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化X轴
|
||||
*/
|
||||
private fun initXAxisData() {
|
||||
val rvXAxis = RecyclerView(context)
|
||||
rvXAxis.adapter = xAxisAdapter
|
||||
rvXAxis.layoutManager = LinearLayoutManager(context, RecyclerView.HORIZONTAL, false)
|
||||
val xAxisLp = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
||||
rvXAxis.layoutParams = xAxisLp
|
||||
addView(rvXAxis)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置数据
|
||||
*/
|
||||
fun setData(data: List<BarDataSet>) {
|
||||
val allValues = mutableListOf<Float>()
|
||||
data.forEach { allValues.addAll(it.values) }
|
||||
|
||||
val yValueList = mutableListOf<YAxisValue>()
|
||||
val rowValue = allValues.maxBy { it } / 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))
|
||||
}
|
||||
maxYAxisValue = value * yAxisRowCount
|
||||
|
||||
xAxisAdapter.setList(data.map { XAxisValue(it.key, it.values) })
|
||||
}
|
||||
|
||||
data class BarDataSet(val key: String, val values: List<Float>)
|
||||
|
||||
data class XAxisValue(val key: String, val values: List<Float>, var anim: Boolean = true)
|
||||
|
||||
data class YAxisValue(val value: Float)
|
||||
|
||||
inner class XAxisAdapter() : BaseQuickAdapter<XAxisValue, BaseViewHolder>(R.layout.listitem_bar_chart_kb_x) {
|
||||
override fun convert(holder: BaseViewHolder, item: XAxisValue) {
|
||||
val lp = holder.itemView.layoutParams as RecyclerView.LayoutParams
|
||||
lp.width = recyclerView.measuredWidth / xAxisColumnCount
|
||||
holder.itemView.layoutParams = lp
|
||||
|
||||
holder.setText(R.id.tv_key, item.key)
|
||||
|
||||
val container = holder.getView<FrameLayout>(R.id.layout_container)
|
||||
container.removeAllViews()
|
||||
|
||||
item.values.forEachIndexed { index, value ->
|
||||
val view = inflate(context, R.layout.layout_x_axis_bar_kb, null)
|
||||
val tvValue = view.findViewById<TextView>(R.id.tv_value)
|
||||
val ivBar = view.findViewById<ImageView>(R.id.iv_bar)
|
||||
val ivBarTop = view.findViewById<ImageView>(R.id.iv_bar_top)
|
||||
|
||||
tvValue.text = DecimalFormat("0.#").format(value)
|
||||
if (index == 0) {
|
||||
ivBar.setImageResource(R.mipmap.ic_bar_chart1)
|
||||
ivBarTop.setImageResource(R.mipmap.ic_bar_chart_top1_kb)
|
||||
} else {
|
||||
ivBar.setImageResource(R.mipmap.ic_bar_chart2)
|
||||
ivBarTop.setImageResource(R.mipmap.ic_bar_chart_top2_kb)
|
||||
}
|
||||
container.addView(view)
|
||||
|
||||
val barHeight = (value / maxYAxisValue * recyclerView.measuredHeight * yAxisRowCount / (yAxisRowCount + 1)).toInt() - DensityUtils.dp2px(10f)
|
||||
if (item.anim) {
|
||||
startAnimation(ivBar, barHeight)
|
||||
item.anim = false
|
||||
} else {
|
||||
val lp = ivBar.layoutParams as ConstraintLayout.LayoutParams
|
||||
lp.height = barHeight.coerceAtLeast(DensityUtils.dp2px(7f))
|
||||
ivBar.layoutParams = lp
|
||||
ivBar.visible()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun startAnimation(barView: View, height: Int) {
|
||||
val valueAnim = ValueAnimator.ofFloat(0f, 1f)
|
||||
valueAnim.addUpdateListener { animator ->
|
||||
val lp = barView.layoutParams as ConstraintLayout.LayoutParams
|
||||
val value = animator.animatedValue as Float
|
||||
lp.height = (value * height).coerceAtLeast(DensityUtils.dp2px(6f).toFloat()).toInt()
|
||||
barView.layoutParams = lp
|
||||
}
|
||||
valueAnim.addListener(onStart = {
|
||||
barView.visible()
|
||||
})
|
||||
valueAnim.duration = 2000
|
||||
valueAnim.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<size
|
||||
android:width="@dimen/dp_6"
|
||||
android:height="@dimen/dp_6" />
|
||||
<solid android:color="#ABD3FF" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<size
|
||||
android:width="@dimen/dp_6"
|
||||
android:height="@dimen/dp_6" />
|
||||
<solid android:color="#FCD4BF" />
|
||||
</shape>
|
||||
|
|
@ -190,6 +190,7 @@
|
|||
android:id="@+id/layout_total_info1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg1_kb"
|
||||
app:layout_constraintDimensionRatio="h,168:84"
|
||||
app:layout_constraintEnd_toStartOf="@id/layout_total_info2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -197,14 +198,14 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_info_count1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg1_kb"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:text="16776条"
|
||||
android:gravity="center"
|
||||
android:text="0条"
|
||||
android:textColor="@color/color_e55b5b"
|
||||
android:textSize="@dimen/sp_30" />
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.821" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -213,6 +214,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg2_kb"
|
||||
app:layout_constraintDimensionRatio="h,168:84"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/layout_total_info1"
|
||||
|
|
@ -220,14 +222,14 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_info_count2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg2_kb"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:text="16776条"
|
||||
android:gravity="center"
|
||||
android:text="0条"
|
||||
android:textColor="@color/color_e55b5b"
|
||||
android:textSize="@dimen/sp_30" />
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.821" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -235,6 +237,7 @@
|
|||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg3_kb"
|
||||
app:layout_constraintDimensionRatio="h,168:84"
|
||||
app:layout_constraintEnd_toStartOf="@id/layout_total_info4"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -242,14 +245,14 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_info_count3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg3_kb"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:text="16776条"
|
||||
android:gravity="center"
|
||||
android:text="0条"
|
||||
android:textColor="@color/color_e55b5b"
|
||||
android:textSize="@dimen/sp_30" />
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.821" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
@ -258,6 +261,7 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg4_kb"
|
||||
app:layout_constraintDimensionRatio="h,168:84"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/layout_total_info3"
|
||||
|
|
@ -265,14 +269,14 @@
|
|||
|
||||
<TextView
|
||||
android:id="@+id/tv_total_info_count4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_guide_vip_total_info_bg4_kb"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:text="16776条"
|
||||
android:gravity="center"
|
||||
android:text="0条"
|
||||
android:textColor="@color/color_e55b5b"
|
||||
android:textSize="@dimen/sp_30" />
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.821" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -280,57 +284,48 @@
|
|||
android:id="@+id/layout_chart"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/ic_guide_vip_info_bg"
|
||||
android:background="@drawable/shape_white_cor15"
|
||||
android:visibility="gone"
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_legend1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/shape_ff9e3a_dp6"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:layout_marginEnd="@dimen/dp_14"
|
||||
android:drawableStart="@drawable/shape_fcd4bf_dp6"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="交易规模"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/color_3c3c3c"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_chart_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_chart_title" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_legend2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:drawableStart="@drawable/shape_00d9ea_dp6"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:drawableStart="@drawable/shape_abd3ff_dp6"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center"
|
||||
android:text="标段数"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/color_3c3c3c"
|
||||
android:textSize="8sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_chart_title"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_legend1"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_chart_title" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.cheng.blzb.widget.BarChartView
|
||||
<com.cheng.blzb.widget.BarChartKBView
|
||||
android:id="@+id/barChart"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_280"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_chart_title" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -373,11 +368,11 @@
|
|||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_goneMarginTop="@dimen/dp_15"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="invisible"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_user"
|
||||
app:layout_goneMarginTop="@dimen/dp_15"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/listitem_guide_vip_kb_goods"
|
||||
tools:visibility="visible" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
<?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">
|
||||
|
||||
<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="#166CCB"
|
||||
android:textSize="8sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bar_top"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_6"
|
||||
android:layout_marginBottom="-3dp"
|
||||
android:src="@mipmap/ic_bar_chart_top1"
|
||||
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="@dimen/dp_6"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@mipmap/ic_bar_chart1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?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">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/layout_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_key"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_key"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:maxLines="1"
|
||||
android:scrollHorizontally="true"
|
||||
android:singleLine="true"
|
||||
android:text="08日"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:textColor="@color/color_6c6c6c"
|
||||
android:textSize="8sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 911 B |
Loading…
Reference in New Issue