修改引导页1
|
|
@ -20,8 +20,8 @@ android {
|
|||
applicationId "com.cheng.BoLe"
|
||||
minSdk 26
|
||||
targetSdk 34
|
||||
versionCode 272
|
||||
versionName "2.7.2"
|
||||
versionCode 273
|
||||
versionName "2.7.3"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
|
|
|||
|
|
@ -33,4 +33,5 @@ object Constants {
|
|||
val pmzdbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/PangMenZhengDaoBiaoTiTi.ttf")
|
||||
val dtjbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DingTalk-JinBuTi.ttf")
|
||||
val ysbth = Typeface.createFromAsset(Utils.getApp().assets, "fonts/YouSheBiaoTiHei.ttf")
|
||||
val albbphtB = Typeface.createFromAsset(Utils.getApp().assets, "fonts/AlibabaPuHuTi-Bold.otf")
|
||||
}
|
||||
|
|
@ -116,7 +116,8 @@ class LauncherActivity : BaseActivity() {
|
|||
LoginActivity.start(this@LauncherActivity)
|
||||
}
|
||||
} else {
|
||||
startActivity<MainActivity>()
|
||||
// startActivity<MainActivity>()
|
||||
startActivity<GuideActivity>()
|
||||
}
|
||||
finish()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ import com.cheng.blzb.manager.EventReportManager
|
|||
import com.cheng.blzb.manager.UserConfigManager
|
||||
import com.cheng.blzb.ui.base.BasePageAdapter
|
||||
import com.cheng.blzb.ui.fragment.guide.item.GuideItem1Fragment
|
||||
import com.cheng.blzb.ui.fragment.guide.item.GuideItem4Fragment
|
||||
import com.cheng.blzb.ui.fragment.guide.item.GuideItem2Fragment
|
||||
import com.cheng.blzb.ui.fragment.guide.item.GuideItem3Fragment
|
||||
import com.cheng.blzb.ui.fragment.guide.item.GuideItem4Fragment
|
||||
import com.cheng.blzb.ui.fragment.guide.item.GuideItem5Fragment
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.ui.BaseFragment
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ import com.cheng.blzb.R
|
|||
import com.cheng.blzb.bean.HotWordEntity
|
||||
import com.example.base.extensions.getColor
|
||||
|
||||
class GuideItem4Adapter : BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide_item4) {
|
||||
class GuideItem3Adapter : BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide_item3) {
|
||||
override fun convert(holder: BaseViewHolder, item: HotWordEntity.Child) {
|
||||
holder.setText(R.id.tv_name, item.name)
|
||||
if (item.isChecked) {
|
||||
holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item4_checked)
|
||||
holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item3_checked)
|
||||
holder.setTextColor(R.id.tv_name, getColor(R.color.color_125ffe))
|
||||
} else {
|
||||
holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item4_default)
|
||||
holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item3_default)
|
||||
holder.setTextColor(R.id.tv_name, getColor(R.color.color_1a1a1a))
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ import com.cheng.blzb.R
|
|||
import com.cheng.blzb.bean.HotWordEntity
|
||||
import com.example.base.extensions.getColor
|
||||
|
||||
class GuideItem4SelectedAdapter: BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide4_selected_keyword) {
|
||||
class GuideItem3SelectedAdapter: BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide3_selected_keyword) {
|
||||
|
||||
init {
|
||||
addChildClickViewIds(R.id.iv_delete)
|
||||
|
|
@ -18,7 +18,7 @@ class GuideItem4SelectedAdapter: BaseQuickAdapter<HotWordEntity.Child, BaseViewH
|
|||
holder.setText(R.id.tv_name, item.name)
|
||||
if (item.id == -1) {
|
||||
holder.setTextColor(R.id.tv_name, "#8D93A1".toColorInt())
|
||||
holder.setImageResource(R.id.iv_delete, R.mipmap.ic_guide_item4_default)
|
||||
holder.setImageResource(R.id.iv_delete, R.mipmap.ic_guide_item3_default)
|
||||
} else {
|
||||
holder.setTextColor(R.id.tv_name, getColor(R.color.color_125ffe))
|
||||
holder.setImageResource(R.id.iv_delete, R.mipmap.ic_guide_item4_delete)
|
||||
|
|
@ -9,7 +9,7 @@ import com.cheng.blzb.R
|
|||
import com.cheng.blzb.bean.AreaEntity
|
||||
import com.example.base.extensions.getColor
|
||||
|
||||
class GuideItem2Area1Adapter: BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_area1) {
|
||||
class GuideItem4Area1Adapter: BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_area1) {
|
||||
override fun convert(holder: BaseViewHolder, item: AreaEntity) {
|
||||
holder.setText(R.id.tv_name, item.name)
|
||||
holder.setTextColor(R.id.tv_name, if (item.isChecked) getColor(R.color.color_125ffe) else getColor(R.color.color_222222))
|
||||
|
|
@ -11,7 +11,7 @@ import com.example.base.decoration.GridSpaceItemDecoration
|
|||
import com.example.base.extensions.onClick
|
||||
import com.example.base.utils.DensityUtils
|
||||
|
||||
class GuideItem2Area2Adapter(): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_area2) {
|
||||
class GuideItem4Area2Adapter(): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_area2) {
|
||||
private var mListener: (() -> Unit)? = null
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
|
|
@ -23,11 +23,11 @@ class GuideItem2Area2Adapter(): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.l
|
|||
tvName.text = item.name
|
||||
|
||||
if (rvCity.adapter == null) {
|
||||
val adapter = GuideItem2CityAdapter()
|
||||
val adapter = GuideItem4CityAdapter()
|
||||
rvCity.adapter = adapter
|
||||
rvCity.addItemDecoration(GridSpaceItemDecoration(2, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
||||
}
|
||||
val cityAdapter = rvCity.adapter as GuideItem2CityAdapter
|
||||
val cityAdapter = rvCity.adapter as GuideItem4CityAdapter
|
||||
cityAdapter.setList(item.children)
|
||||
|
||||
if (item.id == 0) {
|
||||
|
|
@ -5,7 +5,7 @@ import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
|||
import com.cheng.blzb.R
|
||||
import com.cheng.blzb.bean.AreaEntity
|
||||
|
||||
class GuideItem2CityAdapter: BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_city) {
|
||||
class GuideItem4CityAdapter: BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_city) {
|
||||
override fun convert(holder: BaseViewHolder, item: AreaEntity) {
|
||||
holder.setImageResource(R.id.iv_cover, item.getCityImage())
|
||||
holder.setText(R.id.tv_city_name, item.name)
|
||||
|
|
@ -6,6 +6,7 @@ import android.animation.PropertyValuesHolder
|
|||
import android.view.ViewTreeObserver
|
||||
import android.view.animation.LinearInterpolator
|
||||
import androidx.core.animation.addListener
|
||||
import com.cheng.blzb.common.Constants
|
||||
import com.cheng.blzb.databinding.FragmentGuideItem1Binding
|
||||
import com.cheng.blzb.event.GuideEvent
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
||||
|
|
@ -14,10 +15,23 @@ import com.example.base.extensions.onClick
|
|||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.DensityUtils
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import org.libpag.PAGFile
|
||||
|
||||
class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewModel>() {
|
||||
private var canClick = false
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.tvTitle.typeface = Constants.albbphtB
|
||||
binding.tvAppName.typeface = Constants.pmzdbt
|
||||
binding.tvBtn.typeface = Constants.almmsht
|
||||
|
||||
val pagFile = PAGFile.Load(requireContext().assets, "effects/guide_earth.pag")
|
||||
binding.pagView.composition = pagFile
|
||||
binding.pagView.setRepeatCount(0)
|
||||
}
|
||||
|
||||
override fun onLazyLoad() {
|
||||
super.onLazyLoad()
|
||||
binding.root.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
|
|
@ -30,7 +44,7 @@ class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewMode
|
|||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.ivBtn.onClick {
|
||||
binding.layoutBtn.onClick {
|
||||
if (canClick) {
|
||||
RxBus.defaultInstance.post(GuideEvent(1))
|
||||
}
|
||||
|
|
@ -38,97 +52,67 @@ class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewMode
|
|||
}
|
||||
|
||||
private fun startAnim() {
|
||||
val scaleXHolder1 = PropertyValuesHolder.ofFloat("scaleX", 0f, 1.1f)
|
||||
val scaleYHolder1 = PropertyValuesHolder.ofFloat("scaleY", 0f, 1.1f)
|
||||
val scaleXHolder1 = PropertyValuesHolder.ofFloat("scaleX", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
val scaleYHolder1 = PropertyValuesHolder.ofFloat("scaleY", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
|
||||
val scaleXHolder2 = PropertyValuesHolder.ofFloat("scaleX", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
val scaleYHolder2 = PropertyValuesHolder.ofFloat("scaleY", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
val scaleXHolder2 = PropertyValuesHolder.ofFloat("scaleX", 0f, 1f)
|
||||
val scaleYHolder2 = PropertyValuesHolder.ofFloat("scaleY", 0f, 1f)
|
||||
|
||||
val layer1AlphaAnim = ObjectAnimator.ofFloat(binding.ivLayer1, "alpha", 0f, 1f)
|
||||
layer1AlphaAnim.duration = 1600
|
||||
layer1AlphaAnim.startDelay = 1600
|
||||
layer1AlphaAnim.addListener(onStart = {
|
||||
binding.ivLayer1.visible()
|
||||
val bgTransAnim = ObjectAnimator.ofFloat(binding.ivBg, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||
bgTransAnim.duration = 1000
|
||||
bgTransAnim.startDelay = 200
|
||||
bgTransAnim.addListener(onStart = {
|
||||
binding.ivBg.visible()
|
||||
}, onEnd = {
|
||||
binding.pagView.play()
|
||||
})
|
||||
|
||||
val layer2TransAnim = ObjectAnimator.ofFloat(binding.ivLayer2, "translationX", -binding.ivLayer2.width.toFloat(), 0f)
|
||||
layer2TransAnim.duration = 1000
|
||||
layer2TransAnim.addListener(onStart = {
|
||||
binding.ivLayer2.visible()
|
||||
val flowTransAnim = ObjectAnimator.ofFloat(binding.ivFlow, "translationY", -ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||
flowTransAnim.duration = 1000
|
||||
flowTransAnim.startDelay = 2000
|
||||
flowTransAnim.addListener(onStart = {
|
||||
binding.ivFlow.visible()
|
||||
})
|
||||
|
||||
val layer3ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.ivLayer3, scaleXHolder1, scaleYHolder1)
|
||||
layer3ScaleAnim.duration = 1000
|
||||
layer3ScaleAnim.startDelay = 1000
|
||||
layer3ScaleAnim.addListener(onStart = {
|
||||
binding.ivLayer3.visible()
|
||||
})
|
||||
|
||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.layoutTitle, "translationY", -DensityUtils.dp2px(300f).toFloat(), 0f)
|
||||
titleTransAnim.duration = 1000
|
||||
titleTransAnim.startDelay = 1000
|
||||
titleTransAnim.startDelay = 200
|
||||
titleTransAnim.addListener(onStart = {
|
||||
binding.ivTitle.visible()
|
||||
binding.layoutTitle.visible()
|
||||
})
|
||||
|
||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
descTransAnim.duration = 1000
|
||||
descTransAnim.startDelay = 1000
|
||||
descTransAnim.addListener(onStart = {
|
||||
binding.ivDesc.visible()
|
||||
val lightTransAnim = ObjectAnimator.ofFloat(binding.ivLight, "translationX", -ScreenUtils.getScreenWidth().toFloat(), ScreenUtils.getScreenWidth().toFloat())
|
||||
lightTransAnim.duration = 2000
|
||||
lightTransAnim.repeatCount = -1
|
||||
lightTransAnim.startDelay = 2000
|
||||
lightTransAnim.addListener(onStart = {
|
||||
binding.ivLight.visible()
|
||||
})
|
||||
|
||||
val icon1ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.ivIcon1, scaleXHolder2, scaleYHolder2)
|
||||
icon1ScaleAnim.duration = 1000
|
||||
icon1ScaleAnim.startDelay = 1400
|
||||
icon1ScaleAnim.interpolator = LinearInterpolator()
|
||||
icon1ScaleAnim.addListener(onStart = {
|
||||
binding.ivIcon1.visible()
|
||||
val earthScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.pagView, scaleXHolder2, scaleYHolder2)
|
||||
earthScaleAnim.duration = 1000
|
||||
earthScaleAnim.startDelay = 1000
|
||||
earthScaleAnim.addListener(onStart = {
|
||||
binding.pagView.visible()
|
||||
})
|
||||
|
||||
val icon2ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.ivIcon2, scaleXHolder2, scaleYHolder2)
|
||||
icon2ScaleAnim.duration = 1000
|
||||
icon2ScaleAnim.startDelay = 1600
|
||||
icon2ScaleAnim.interpolator = LinearInterpolator()
|
||||
icon2ScaleAnim.addListener(onStart = {
|
||||
binding.ivIcon2.visible()
|
||||
})
|
||||
|
||||
val icon3TransAnim = ObjectAnimator.ofFloat(binding.ivIcon3, "translationX", -DensityUtils.dp2px(200f).toFloat(), DensityUtils.dp2px(30f).toFloat(), -DensityUtils.dp2px(30f).toFloat(), 0f)
|
||||
icon3TransAnim.duration = 1000
|
||||
icon3TransAnim.startDelay = 1200
|
||||
icon3TransAnim.addListener(onStart = {
|
||||
binding.ivIcon3.visible()
|
||||
})
|
||||
|
||||
val icon4TransAnim = ObjectAnimator.ofFloat(binding.ivIcon4, "translationX", DensityUtils.dp2px(200f).toFloat(), -DensityUtils.dp2px(30f).toFloat(), DensityUtils.dp2px(30f).toFloat(), 0f)
|
||||
icon4TransAnim.duration = 1000
|
||||
icon4TransAnim.startDelay = 1200
|
||||
icon4TransAnim.addListener(onStart = {
|
||||
binding.ivIcon4.visible()
|
||||
})
|
||||
|
||||
val btnScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.ivBtn, scaleXHolder2, scaleYHolder2)
|
||||
val btnScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutBtn, scaleXHolder1, scaleYHolder1)
|
||||
btnScaleAnim.duration = 1000
|
||||
btnScaleAnim.startDelay = 1800
|
||||
btnScaleAnim.interpolator = LinearInterpolator()
|
||||
btnScaleAnim.addListener(onStart = {
|
||||
binding.ivBtn.visible()
|
||||
binding.layoutBtn.visible()
|
||||
}, onEnd = {
|
||||
canClick = true
|
||||
})
|
||||
|
||||
val animSet = AnimatorSet()
|
||||
animSet.playTogether(
|
||||
layer1AlphaAnim,
|
||||
layer2TransAnim,
|
||||
layer3ScaleAnim,
|
||||
bgTransAnim,
|
||||
flowTransAnim,
|
||||
titleTransAnim,
|
||||
descTransAnim,
|
||||
icon1ScaleAnim,
|
||||
icon2ScaleAnim,
|
||||
icon3TransAnim,
|
||||
icon4TransAnim,
|
||||
lightTransAnim,
|
||||
earthScaleAnim,
|
||||
btnScaleAnim
|
||||
)
|
||||
animSet.start()
|
||||
|
|
|
|||
|
|
@ -2,21 +2,18 @@ package com.cheng.blzb.ui.fragment.guide.item
|
|||
|
||||
import android.animation.AnimatorSet
|
||||
import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.animation.PropertyValuesHolder
|
||||
import android.view.animation.LinearInterpolator
|
||||
import androidx.core.animation.addListener
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.cheng.blzb.bean.AreaEntity
|
||||
import com.cheng.blzb.R
|
||||
import com.cheng.blzb.common.Constants
|
||||
import com.cheng.blzb.databinding.FragmentGuideItem2Binding
|
||||
import com.cheng.blzb.event.GuideEvent
|
||||
import com.cheng.blzb.manager.UserConfigManager
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem2Area1Adapter
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem2Area2Adapter
|
||||
import com.cheng.blzb.widget.LinearTopSmoothScroller
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
|
|
@ -25,155 +22,307 @@ import com.example.base.utils.DensityUtils
|
|||
import com.example.base.utils.ScreenUtils
|
||||
|
||||
class GuideItem2Fragment : BaseFragment<FragmentGuideItem2Binding, GuideViewModel>() {
|
||||
private val area1Adapter by lazy { GuideItem2Area1Adapter() }
|
||||
|
||||
private val area2Adapter by lazy { GuideItem2Area2Adapter() }
|
||||
private val ids = mutableListOf<Int>()
|
||||
|
||||
private var canClick = false
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.btnNext.typeface = Constants.almmsht
|
||||
|
||||
binding.rvArea1.adapter = area1Adapter
|
||||
binding.rvArea2.adapter = area2Adapter
|
||||
binding.tvName1.typeface = Constants.douyinsansB
|
||||
binding.tvName2.typeface = Constants.douyinsansB
|
||||
binding.tvName3.typeface = Constants.douyinsansB
|
||||
binding.tvName4.typeface = Constants.douyinsansB
|
||||
binding.tvName5.typeface = Constants.douyinsansB
|
||||
binding.tvName6.typeface = Constants.douyinsansB
|
||||
binding.tvName7.typeface = Constants.douyinsansB
|
||||
binding.tvName8.typeface = Constants.douyinsansB
|
||||
}
|
||||
|
||||
override fun onLazyLoad() {
|
||||
super.onLazyLoad()
|
||||
if (UserConfigManager.getAreaList().isNotEmpty()) {
|
||||
if (UserConfigManager.getGuideKeywords().isNotEmpty()) {
|
||||
setData()
|
||||
} else {
|
||||
mViewModel.getCityList()
|
||||
mViewModel.getHotWordList()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
area1Adapter.setOnItemClickListener { _, _, position ->
|
||||
val item = area1Adapter.getItem(position)
|
||||
area1Adapter.data.find { it.isChecked }?.isChecked = false
|
||||
item.isChecked = true
|
||||
|
||||
scrollToPosition(position)
|
||||
binding.layoutOption1.onClick {
|
||||
val id = binding.layoutOption1.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck1.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck1.visible()
|
||||
}
|
||||
}
|
||||
|
||||
area2Adapter.setOnCityClickListener {
|
||||
val selectList = mutableListOf<AreaEntity>()
|
||||
area2Adapter.data.forEach { area ->
|
||||
selectList.addAll(area.children.filter { it.isChecked })
|
||||
binding.layoutOption2.onClick {
|
||||
val id = binding.layoutOption2.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck2.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck2.visible()
|
||||
}
|
||||
binding.tvCityCount.text = "${selectList.size}"
|
||||
}
|
||||
|
||||
binding.rvArea2.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
val layoutManager = binding.rvArea2.layoutManager as LinearLayoutManager
|
||||
val firstPosition = layoutManager.findFirstCompletelyVisibleItemPosition()
|
||||
|
||||
if (firstPosition >= 0) {
|
||||
val firstItem = area1Adapter.getItem(firstPosition)
|
||||
area1Adapter.data.find { it.isChecked }?.isChecked = false
|
||||
firstItem.isChecked = true
|
||||
area1Adapter.notifyDataSetChanged()
|
||||
}
|
||||
binding.layoutOption3.onClick {
|
||||
val id = binding.layoutOption3.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck3.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck3.visible()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
binding.layoutOption4.onClick {
|
||||
val id = binding.layoutOption4.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck4.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck4.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption5.onClick {
|
||||
val id = binding.layoutOption5.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck5.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck5.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption6.onClick {
|
||||
val id = binding.layoutOption6.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck6.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck6.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption7.onClick {
|
||||
val id = binding.layoutOption7.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck7.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck7.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption8.onClick {
|
||||
val id = 0
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck8.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck8.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.ivBtn.onClick {
|
||||
if (canClick) {
|
||||
val selectList = mutableListOf<AreaEntity>()
|
||||
area1Adapter.data.forEach { area ->
|
||||
selectList.addAll(area.children.filter { it.isChecked })
|
||||
}
|
||||
if (selectList.isEmpty()) {
|
||||
toast("请选择地区")
|
||||
if (ids.isEmpty()) {
|
||||
toast("请选择行业")
|
||||
return@onClick
|
||||
}
|
||||
GuideFragment.cityList.addAll(selectList)
|
||||
RxBus.defaultInstance.post(GuideEvent(2))
|
||||
val hasOther = ids.contains(0)
|
||||
val selectedList = if (hasOther) {
|
||||
UserConfigManager.getGuideKeywords()
|
||||
} else {
|
||||
UserConfigManager.getGuideKeywords().filter { ids.contains(it.id) }
|
||||
}
|
||||
selectedList.forEach {
|
||||
GuideFragment.hotWordList.addAll(it.children)
|
||||
}
|
||||
RxBus.defaultInstance.post(GuideEvent(3))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.cityLiveData.observe(this) {
|
||||
UserConfigManager.saveAreaList(it)
|
||||
mViewModel.hotWordLiveData.observe(this) {
|
||||
UserConfigManager.saveGuideKeywords(it)
|
||||
setData()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setData() {
|
||||
val areaList = UserConfigManager.getAreaList()
|
||||
areaList.add(0, AreaEntity(0, name = "全国地区", isChecked = true))
|
||||
area1Adapter.setList(areaList)
|
||||
area2Adapter.setList(areaList)
|
||||
val hotWords = UserConfigManager.getGuideKeywords()
|
||||
hotWords.forEachIndexed { index, item ->
|
||||
when(index) {
|
||||
0 -> {
|
||||
binding.tvName1.text = item.name
|
||||
binding.ivIcon1.setImageResource(R.mipmap.ic_guide_item3_icon1)
|
||||
binding.layoutOption1.tag = item.id
|
||||
}
|
||||
1 -> {
|
||||
binding.tvName2.text = item.name
|
||||
binding.ivIcon2.setImageResource(R.mipmap.ic_guide_item3_icon2)
|
||||
binding.layoutOption2.tag = item.id
|
||||
}
|
||||
2 -> {
|
||||
binding.tvName3.text = item.name
|
||||
binding.ivIcon3.setImageResource(R.mipmap.ic_guide_item3_icon3)
|
||||
binding.layoutOption3.tag = item.id
|
||||
}
|
||||
3 -> {
|
||||
binding.tvName4.text = item.name
|
||||
binding.ivIcon4.setImageResource(R.mipmap.ic_guide_item3_icon4)
|
||||
binding.layoutOption4.tag = item.id
|
||||
}
|
||||
4 -> {
|
||||
binding.tvName5.text = item.name
|
||||
binding.ivIcon5.setImageResource(R.mipmap.ic_guide_item3_icon5)
|
||||
binding.layoutOption5.tag = item.id
|
||||
}
|
||||
5 -> {
|
||||
binding.tvName6.text = item.name
|
||||
binding.ivIcon6.setImageResource(R.mipmap.ic_guide_item3_icon6)
|
||||
binding.layoutOption6.tag = item.id
|
||||
}
|
||||
6 -> {
|
||||
binding.tvName7.text = item.name
|
||||
binding.ivIcon7.setImageResource(R.mipmap.ic_guide_item3_icon7)
|
||||
binding.layoutOption7.tag = item.id
|
||||
}
|
||||
}
|
||||
}
|
||||
startAnim()
|
||||
}
|
||||
|
||||
private fun scrollToPosition(position: Int) {
|
||||
binding.rvArea2.layoutManager?.startSmoothScroll(
|
||||
LinearTopSmoothScroller(requireContext(), true)
|
||||
.apply { targetPosition = position }
|
||||
)
|
||||
}
|
||||
|
||||
private fun startAnim() {
|
||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationX", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
val scaleXHolder = PropertyValuesHolder.ofFloat("scaleX", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
val scaleYHolder = PropertyValuesHolder.ofFloat("scaleY", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
|
||||
val option1ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption1, scaleXHolder, scaleYHolder)
|
||||
option1ScaleAnim.duration = 1000
|
||||
option1ScaleAnim.startDelay = 1000
|
||||
option1ScaleAnim.interpolator = LinearInterpolator()
|
||||
option1ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption1.visible()
|
||||
})
|
||||
|
||||
val option2ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption2, scaleXHolder, scaleYHolder)
|
||||
option2ScaleAnim.duration = 1000
|
||||
option2ScaleAnim.startDelay = 1400
|
||||
option2ScaleAnim.interpolator = LinearInterpolator()
|
||||
option2ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption2.visible()
|
||||
})
|
||||
|
||||
val option3ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption3, scaleXHolder, scaleYHolder)
|
||||
option3ScaleAnim.duration = 1000
|
||||
option3ScaleAnim.startDelay = 1800
|
||||
option3ScaleAnim.interpolator = LinearInterpolator()
|
||||
option3ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption3.visible()
|
||||
})
|
||||
|
||||
val option4ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption4, scaleXHolder, scaleYHolder)
|
||||
option4ScaleAnim.duration = 1000
|
||||
option4ScaleAnim.startDelay = 1400
|
||||
option4ScaleAnim.interpolator = LinearInterpolator()
|
||||
option4ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption4.visible()
|
||||
})
|
||||
|
||||
val option5ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption5, scaleXHolder, scaleYHolder)
|
||||
option5ScaleAnim.duration = 1000
|
||||
option5ScaleAnim.startDelay = 1800
|
||||
option5ScaleAnim.interpolator = LinearInterpolator()
|
||||
option5ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption5.visible()
|
||||
})
|
||||
|
||||
val option6ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption6, scaleXHolder, scaleYHolder)
|
||||
option6ScaleAnim.duration = 1000
|
||||
option6ScaleAnim.startDelay = 1200
|
||||
option6ScaleAnim.interpolator = LinearInterpolator()
|
||||
option6ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption6.visible()
|
||||
})
|
||||
|
||||
val option7ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption7, scaleXHolder, scaleYHolder)
|
||||
option7ScaleAnim.duration = 1000
|
||||
option7ScaleAnim.startDelay = 1600
|
||||
option7ScaleAnim.interpolator = LinearInterpolator()
|
||||
option7ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption7.visible()
|
||||
})
|
||||
|
||||
val option8ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption8, scaleXHolder, scaleYHolder)
|
||||
option8ScaleAnim.duration = 1000
|
||||
option8ScaleAnim.startDelay = 1800
|
||||
option8ScaleAnim.interpolator = LinearInterpolator()
|
||||
option8ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption8.visible()
|
||||
})
|
||||
|
||||
val bgTransAnim = ObjectAnimator.ofFloat(binding.ivBg, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||
bgTransAnim.duration = 1000
|
||||
bgTransAnim.addListener(onStart = {
|
||||
binding.ivBg.visible()
|
||||
})
|
||||
|
||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
titleTransAnim.duration = 1000
|
||||
titleTransAnim.startDelay = 600
|
||||
titleTransAnim.startDelay = 200
|
||||
titleTransAnim.addListener(onStart = {
|
||||
binding.ivTitle.visible()
|
||||
})
|
||||
|
||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationX", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
descTransAnim.duration = 1000
|
||||
descTransAnim.startDelay = 600
|
||||
descTransAnim.startDelay = 200
|
||||
descTransAnim.addListener(onStart = {
|
||||
binding.ivDesc.visible()
|
||||
})
|
||||
|
||||
val contentTransAnim = ObjectAnimator.ofFloat(binding.layoutContent, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||
contentTransAnim.duration = 1000
|
||||
contentTransAnim.addListener(onStart = {
|
||||
binding.layoutContent.visible()
|
||||
})
|
||||
|
||||
val icon1TransAnim = ObjectAnimator.ofFloat(binding.ivIcon1, "translationX", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
icon1TransAnim.duration = 1000
|
||||
icon1TransAnim.startDelay = 600
|
||||
icon1TransAnim.addListener(onStart = {
|
||||
binding.ivIcon1.visible()
|
||||
})
|
||||
|
||||
val icon2TransAnim = ObjectAnimator.ofFloat(binding.ivIcon2, "translationY", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
icon2TransAnim.duration = 1000
|
||||
icon2TransAnim.startDelay = 400
|
||||
icon2TransAnim.addListener(onStart = {
|
||||
binding.ivIcon2.visible()
|
||||
})
|
||||
|
||||
val countTransAnim = ObjectAnimator.ofFloat(binding.tvCityCount, "translationY", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
countTransAnim.duration = 1000
|
||||
countTransAnim.startDelay = 400
|
||||
countTransAnim.addListener(onStart = {
|
||||
binding.tvCityCount.visible()
|
||||
})
|
||||
|
||||
val btnTransAnim = ObjectAnimator.ofFloat(binding.btnNext, "translationY", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
btnTransAnim.duration = 1000
|
||||
btnTransAnim.startDelay = 400
|
||||
btnTransAnim.addListener(onStart = {
|
||||
binding.btnNext.visible()
|
||||
val btnScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.ivBtn, scaleXHolder, scaleYHolder)
|
||||
btnScaleAnim.duration = 1000
|
||||
btnScaleAnim.startDelay = 600
|
||||
btnScaleAnim.interpolator = LinearInterpolator()
|
||||
btnScaleAnim.addListener(onStart = {
|
||||
binding.ivBtn.visible()
|
||||
}, onEnd = {
|
||||
canClick = true
|
||||
})
|
||||
|
||||
val animSet = AnimatorSet()
|
||||
animSet.playTogether(titleTransAnim, descTransAnim, contentTransAnim, icon1TransAnim, icon2TransAnim, countTransAnim, btnTransAnim)
|
||||
animSet.playTogether(
|
||||
option1ScaleAnim,
|
||||
option2ScaleAnim,
|
||||
option3ScaleAnim,
|
||||
option4ScaleAnim,
|
||||
option5ScaleAnim,
|
||||
option6ScaleAnim,
|
||||
option7ScaleAnim,
|
||||
option8ScaleAnim,
|
||||
bgTransAnim,
|
||||
titleTransAnim,
|
||||
descTransAnim,
|
||||
btnScaleAnim
|
||||
)
|
||||
animSet.start()
|
||||
}
|
||||
}
|
||||
|
|
@ -2,286 +2,210 @@ package com.cheng.blzb.ui.fragment.guide.item
|
|||
|
||||
import android.animation.AnimatorSet
|
||||
import android.animation.ObjectAnimator
|
||||
import android.animation.PropertyValuesHolder
|
||||
import android.view.Gravity
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.view.animation.RotateAnimation
|
||||
import android.widget.TextView
|
||||
import androidx.core.animation.addListener
|
||||
import com.cheng.blzb.R
|
||||
import com.cheng.blzb.common.Constants
|
||||
import com.cheng.blzb.bean.HotWordEntity
|
||||
import com.cheng.blzb.databinding.FragmentGuideItem3Binding
|
||||
import com.cheng.blzb.event.GuideEvent
|
||||
import com.cheng.blzb.manager.UserConfigManager
|
||||
import com.cheng.blzb.ui.dialog.AddKeywordDialog
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem3Adapter
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem3SelectedAdapter
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.decoration.GridSpaceItemDecoration
|
||||
import com.example.base.extensions.getColor
|
||||
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.utils.DensityUtils
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import com.example.base.utils.SpanUtils
|
||||
import kotlin.math.ceil
|
||||
|
||||
class GuideItem3Fragment : BaseFragment<FragmentGuideItem3Binding, GuideViewModel>() {
|
||||
private val ids = mutableListOf<Int>()
|
||||
private val mAdapter by lazy { GuideItem3Adapter() }
|
||||
|
||||
private val selectedAdapter by lazy { GuideItem3SelectedAdapter() }
|
||||
|
||||
private val hotWordChildList = mutableListOf<HotWordEntity.Child>()
|
||||
|
||||
private var tabIndex = 0
|
||||
|
||||
private var page = 0
|
||||
|
||||
private var canClick = false
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.tvName1.typeface = Constants.douyinsansB
|
||||
binding.tvName2.typeface = Constants.douyinsansB
|
||||
binding.tvName3.typeface = Constants.douyinsansB
|
||||
binding.tvName4.typeface = Constants.douyinsansB
|
||||
binding.tvName5.typeface = Constants.douyinsansB
|
||||
binding.tvName6.typeface = Constants.douyinsansB
|
||||
binding.tvName7.typeface = Constants.douyinsansB
|
||||
binding.tvName8.typeface = Constants.douyinsansB
|
||||
binding.mRecyclerView.adapter = mAdapter
|
||||
binding.mRecyclerView.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
||||
|
||||
binding.rvSelectedKeywords.adapter = selectedAdapter
|
||||
binding.rvSelectedKeywords.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
||||
selectedAdapter.addData(HotWordEntity.Child(id = -1, name = "自定义", isChecked = true))
|
||||
setKeywordCount()
|
||||
}
|
||||
|
||||
override fun onLazyLoad() {
|
||||
super.onLazyLoad()
|
||||
if (UserConfigManager.getGuideKeywords().isNotEmpty()) {
|
||||
setData()
|
||||
} else {
|
||||
mViewModel.getHotWordList()
|
||||
hotWordChildList.addAll(GuideFragment.hotWordList)
|
||||
hotWordChildList.forEach { item ->
|
||||
binding.tabLayout.addView(createTab(item.name))
|
||||
}
|
||||
|
||||
startAnim()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.layoutOption1.onClick {
|
||||
val id = binding.layoutOption1.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck1.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck1.visible()
|
||||
binding.tabLayout.observeIndexChange { fromIndex, toIndex, _, _ ->
|
||||
page = 0
|
||||
tabIndex = toIndex
|
||||
|
||||
if (fromIndex >= 0) {
|
||||
val textView = binding.tabLayout.getChildAt(fromIndex)
|
||||
textView.setBackgroundResource(0)
|
||||
}
|
||||
if (toIndex >= 0) {
|
||||
val textView = binding.tabLayout.getChildAt(toIndex)
|
||||
textView.setBackgroundResource(R.drawable.shape_f5f8ff_top_cor16)
|
||||
}
|
||||
|
||||
val hotWordChild = hotWordChildList[toIndex]
|
||||
binding.tvAmount.text = "${hotWordChild.amount}亿元"
|
||||
|
||||
val keywordList = mutableListOf<HotWordEntity.Child>()
|
||||
for (i in 0 until 15) {
|
||||
keywordList.add(hotWordChild.children[i])
|
||||
}
|
||||
mAdapter.setList(keywordList)
|
||||
}
|
||||
|
||||
binding.layoutOption2.onClick {
|
||||
val id = binding.layoutOption2.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck2.gone()
|
||||
binding.ivRefresh.onClick {
|
||||
startRotate()
|
||||
val hotWordChild = hotWordChildList[tabIndex]
|
||||
if (ceil(hotWordChild.children.size / 15.0) > page + 1) {
|
||||
page++
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck2.visible()
|
||||
page = 0
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption3.onClick {
|
||||
val id = binding.layoutOption3.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck3.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck3.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption4.onClick {
|
||||
val id = binding.layoutOption4.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck4.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck4.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption5.onClick {
|
||||
val id = binding.layoutOption5.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck5.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck5.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption6.onClick {
|
||||
val id = binding.layoutOption6.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck6.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck6.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption7.onClick {
|
||||
val id = binding.layoutOption7.tag as Int
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck7.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck7.visible()
|
||||
}
|
||||
}
|
||||
|
||||
binding.layoutOption8.onClick {
|
||||
val id = 0
|
||||
if (ids.contains(id)) {
|
||||
ids.remove(id)
|
||||
binding.ivCheck8.gone()
|
||||
} else {
|
||||
ids.add(id)
|
||||
binding.ivCheck8.visible()
|
||||
val keywordList = mutableListOf<HotWordEntity.Child>()
|
||||
for (i in page * 15 until ((page + 1) * 15).coerceAtMost(hotWordChild.children.size)) {
|
||||
keywordList.add(hotWordChild.children[i])
|
||||
}
|
||||
mAdapter.setList(keywordList)
|
||||
}
|
||||
|
||||
binding.ivBtn.onClick {
|
||||
if (canClick) {
|
||||
if (ids.isEmpty()) {
|
||||
toast("请选择行业")
|
||||
return@onClick
|
||||
if (!canClick) return@onClick
|
||||
if (selectedAdapter.data.size == 1) {
|
||||
toast("请添加关键词")
|
||||
return@onClick
|
||||
}
|
||||
val keywords = selectedAdapter.data.filter { it.id != -1 }.map { it.name }
|
||||
val cityIds = GuideFragment.cityList.map { it.id }
|
||||
mViewModel.getTotalBidInfo(keywords.joinToString(","), cityIds.joinToString(","), "${hotWordChildList.size}")
|
||||
}
|
||||
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
if (!canClick) return@setOnItemClickListener
|
||||
val item = mAdapter.getItem(i)
|
||||
if (!item.isChecked && selectedAdapter.data.size == 6) {
|
||||
toast("最多添加5个关键词")
|
||||
return@setOnItemClickListener
|
||||
}
|
||||
|
||||
item.isChecked = !item.isChecked
|
||||
mAdapter.notifyDataSetChanged()
|
||||
if (item.isChecked) {
|
||||
selectedAdapter.addData(item)
|
||||
} else {
|
||||
selectedAdapter.remove(item)
|
||||
}
|
||||
setKeywordCount()
|
||||
}
|
||||
|
||||
selectedAdapter.setOnItemClickListener { _, _, i ->
|
||||
val item = selectedAdapter.getItem(i)
|
||||
if (item.id == -1) {
|
||||
if (selectedAdapter.data.size == 6) {
|
||||
toast("最多添加5个关键词")
|
||||
return@setOnItemClickListener
|
||||
}
|
||||
val hasOther = ids.contains(0)
|
||||
val selectedList = if (hasOther) {
|
||||
UserConfigManager.getGuideKeywords()
|
||||
} else {
|
||||
UserConfigManager.getGuideKeywords().filter { ids.contains(it.id) }
|
||||
val f = AddKeywordDialog.newInstance()
|
||||
f.setOnBackListener {
|
||||
selectedAdapter.addData(HotWordEntity.Child(name = it, isChecked = true))
|
||||
setKeywordCount()
|
||||
}
|
||||
selectedList.forEach {
|
||||
GuideFragment.hotWordList.addAll(it.children)
|
||||
}
|
||||
RxBus.defaultInstance.post(GuideEvent(3))
|
||||
f.show(childFragmentManager, "")
|
||||
}
|
||||
}
|
||||
|
||||
selectedAdapter.setOnItemChildClickListener { _, view, i ->
|
||||
val item = selectedAdapter.getItem(i)
|
||||
if (!canClick || item.id == -1) return@setOnItemChildClickListener
|
||||
if (view.id == R.id.iv_delete) {
|
||||
selectedAdapter.remove(item)
|
||||
item.isChecked = false
|
||||
mAdapter.notifyDataSetChanged()
|
||||
setKeywordCount()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.hotWordLiveData.observe(this) {
|
||||
UserConfigManager.saveGuideKeywords(it)
|
||||
setData()
|
||||
mViewModel.totalLiveData.observe(this) {
|
||||
GuideFragment.totalInfo = it
|
||||
RxBus.defaultInstance.post(GuideEvent(4))
|
||||
}
|
||||
}
|
||||
|
||||
private fun setData() {
|
||||
val hotWords = UserConfigManager.getGuideKeywords()
|
||||
hotWords.forEachIndexed { index, item ->
|
||||
when(index) {
|
||||
0 -> {
|
||||
binding.tvName1.text = item.name
|
||||
binding.ivIcon1.setImageResource(R.mipmap.ic_guide_item3_icon1)
|
||||
binding.layoutOption1.tag = item.id
|
||||
}
|
||||
1 -> {
|
||||
binding.tvName2.text = item.name
|
||||
binding.ivIcon2.setImageResource(R.mipmap.ic_guide_item3_icon2)
|
||||
binding.layoutOption2.tag = item.id
|
||||
}
|
||||
2 -> {
|
||||
binding.tvName3.text = item.name
|
||||
binding.ivIcon3.setImageResource(R.mipmap.ic_guide_item3_icon3)
|
||||
binding.layoutOption3.tag = item.id
|
||||
}
|
||||
3 -> {
|
||||
binding.tvName4.text = item.name
|
||||
binding.ivIcon4.setImageResource(R.mipmap.ic_guide_item3_icon4)
|
||||
binding.layoutOption4.tag = item.id
|
||||
}
|
||||
4 -> {
|
||||
binding.tvName5.text = item.name
|
||||
binding.ivIcon5.setImageResource(R.mipmap.ic_guide_item3_icon5)
|
||||
binding.layoutOption5.tag = item.id
|
||||
}
|
||||
5 -> {
|
||||
binding.tvName6.text = item.name
|
||||
binding.ivIcon6.setImageResource(R.mipmap.ic_guide_item3_icon6)
|
||||
binding.layoutOption6.tag = item.id
|
||||
}
|
||||
6 -> {
|
||||
binding.tvName7.text = item.name
|
||||
binding.ivIcon7.setImageResource(R.mipmap.ic_guide_item3_icon7)
|
||||
binding.layoutOption7.tag = item.id
|
||||
}
|
||||
}
|
||||
private fun setKeywordCount() {
|
||||
SpanUtils.with(binding.tvKeywordsCount)
|
||||
.append("已添加关键词(")
|
||||
.append("${selectedAdapter.data.size - 1}")
|
||||
.setForegroundColor(getColor(R.color.color_ff493c))
|
||||
.append("/5)")
|
||||
.create()
|
||||
}
|
||||
|
||||
private fun createTab(title: String): TextView {
|
||||
val textView = TextView(requireContext())
|
||||
textView.text = title
|
||||
textView.gravity = Gravity.CENTER
|
||||
textView.setPadding(DensityUtils.dp2px(14f) , 0, DensityUtils.dp2px(14f), 0)
|
||||
return textView
|
||||
}
|
||||
|
||||
private fun startRotate() {
|
||||
if (binding.ivRefresh.animation != null) {
|
||||
binding.ivRefresh.animation.cancel()
|
||||
}
|
||||
startAnim()
|
||||
val anim = RotateAnimation(0f, 360f, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f)
|
||||
anim.duration = 1000
|
||||
binding.ivRefresh.startAnimation(anim)
|
||||
}
|
||||
|
||||
private fun startAnim() {
|
||||
val scaleXHolder = PropertyValuesHolder.ofFloat("scaleX", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
val scaleYHolder = PropertyValuesHolder.ofFloat("scaleY", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
||||
|
||||
val option1ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption1, scaleXHolder, scaleYHolder)
|
||||
option1ScaleAnim.duration = 1000
|
||||
option1ScaleAnim.startDelay = 1000
|
||||
option1ScaleAnim.interpolator = LinearInterpolator()
|
||||
option1ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption1.visible()
|
||||
val keyword1TransAnim = ObjectAnimator.ofFloat(binding.layoutKeywords, "translationY", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
||||
keyword1TransAnim.duration = 1000
|
||||
keyword1TransAnim.startDelay = 200
|
||||
keyword1TransAnim.addListener(onStart = {
|
||||
binding.layoutKeywords.visible()
|
||||
})
|
||||
|
||||
val option2ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption2, scaleXHolder, scaleYHolder)
|
||||
option2ScaleAnim.duration = 1000
|
||||
option2ScaleAnim.startDelay = 1400
|
||||
option2ScaleAnim.interpolator = LinearInterpolator()
|
||||
option2ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption2.visible()
|
||||
})
|
||||
|
||||
val option3ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption3, scaleXHolder, scaleYHolder)
|
||||
option3ScaleAnim.duration = 1000
|
||||
option3ScaleAnim.startDelay = 1800
|
||||
option3ScaleAnim.interpolator = LinearInterpolator()
|
||||
option3ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption3.visible()
|
||||
})
|
||||
|
||||
val option4ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption4, scaleXHolder, scaleYHolder)
|
||||
option4ScaleAnim.duration = 1000
|
||||
option4ScaleAnim.startDelay = 1400
|
||||
option4ScaleAnim.interpolator = LinearInterpolator()
|
||||
option4ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption4.visible()
|
||||
})
|
||||
|
||||
val option5ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption5, scaleXHolder, scaleYHolder)
|
||||
option5ScaleAnim.duration = 1000
|
||||
option5ScaleAnim.startDelay = 1800
|
||||
option5ScaleAnim.interpolator = LinearInterpolator()
|
||||
option5ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption5.visible()
|
||||
})
|
||||
|
||||
val option6ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption6, scaleXHolder, scaleYHolder)
|
||||
option6ScaleAnim.duration = 1000
|
||||
option6ScaleAnim.startDelay = 1200
|
||||
option6ScaleAnim.interpolator = LinearInterpolator()
|
||||
option6ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption6.visible()
|
||||
})
|
||||
|
||||
val option7ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption7, scaleXHolder, scaleYHolder)
|
||||
option7ScaleAnim.duration = 1000
|
||||
option7ScaleAnim.startDelay = 1600
|
||||
option7ScaleAnim.interpolator = LinearInterpolator()
|
||||
option7ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption7.visible()
|
||||
})
|
||||
|
||||
val option8ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption8, scaleXHolder, scaleYHolder)
|
||||
option8ScaleAnim.duration = 1000
|
||||
option8ScaleAnim.startDelay = 1800
|
||||
option8ScaleAnim.interpolator = LinearInterpolator()
|
||||
option8ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption8.visible()
|
||||
})
|
||||
|
||||
val bgTransAnim = ObjectAnimator.ofFloat(binding.ivBg, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||
bgTransAnim.duration = 1000
|
||||
bgTransAnim.addListener(onStart = {
|
||||
binding.ivBg.visible()
|
||||
val keyword2TransAnim = ObjectAnimator.ofFloat(binding.layoutSelectedKeywords, "translationY", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
||||
keyword2TransAnim.duration = 1000
|
||||
keyword2TransAnim.startDelay = 600
|
||||
keyword2TransAnim.addListener(onStart = {
|
||||
binding.layoutSelectedKeywords.visible()
|
||||
})
|
||||
|
||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
|
|
@ -293,16 +217,16 @@ class GuideItem3Fragment : BaseFragment<FragmentGuideItem3Binding, GuideViewMode
|
|||
|
||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
descTransAnim.duration = 1000
|
||||
descTransAnim.startDelay = 200
|
||||
titleTransAnim.startDelay = 200
|
||||
descTransAnim.addListener(onStart = {
|
||||
binding.ivDesc.visible()
|
||||
})
|
||||
|
||||
val btnScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.ivBtn, scaleXHolder, scaleYHolder)
|
||||
btnScaleAnim.duration = 1000
|
||||
btnScaleAnim.startDelay = 600
|
||||
btnScaleAnim.interpolator = LinearInterpolator()
|
||||
btnScaleAnim.addListener(onStart = {
|
||||
val btnTransAnim = ObjectAnimator.ofFloat(binding.ivBtn, "translationY", DensityUtils.dp2px(100f).toFloat(), 0f)
|
||||
btnTransAnim.duration = 1000
|
||||
btnTransAnim.startDelay = 800
|
||||
btnTransAnim.interpolator = LinearInterpolator()
|
||||
btnTransAnim.addListener(onStart = {
|
||||
binding.ivBtn.visible()
|
||||
}, onEnd = {
|
||||
canClick = true
|
||||
|
|
@ -310,18 +234,11 @@ class GuideItem3Fragment : BaseFragment<FragmentGuideItem3Binding, GuideViewMode
|
|||
|
||||
val animSet = AnimatorSet()
|
||||
animSet.playTogether(
|
||||
option1ScaleAnim,
|
||||
option2ScaleAnim,
|
||||
option3ScaleAnim,
|
||||
option4ScaleAnim,
|
||||
option5ScaleAnim,
|
||||
option6ScaleAnim,
|
||||
option7ScaleAnim,
|
||||
option8ScaleAnim,
|
||||
bgTransAnim,
|
||||
keyword1TransAnim,
|
||||
keyword2TransAnim,
|
||||
titleTransAnim,
|
||||
descTransAnim,
|
||||
btnScaleAnim
|
||||
btnTransAnim
|
||||
)
|
||||
animSet.start()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,244 +2,178 @@ package com.cheng.blzb.ui.fragment.guide.item
|
|||
|
||||
import android.animation.AnimatorSet
|
||||
import android.animation.ObjectAnimator
|
||||
import android.view.Gravity
|
||||
import android.view.animation.LinearInterpolator
|
||||
import android.view.animation.RotateAnimation
|
||||
import android.widget.TextView
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.core.animation.addListener
|
||||
import com.cheng.blzb.R
|
||||
import com.cheng.blzb.bean.HotWordEntity
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.cheng.blzb.bean.AreaEntity
|
||||
import com.cheng.blzb.common.Constants
|
||||
import com.cheng.blzb.databinding.FragmentGuideItem4Binding
|
||||
import com.cheng.blzb.event.GuideEvent
|
||||
import com.cheng.blzb.ui.dialog.AddKeywordDialog
|
||||
import com.cheng.blzb.manager.UserConfigManager
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem4Adapter
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem4SelectedAdapter
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem4Area1Adapter
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem4Area2Adapter
|
||||
import com.cheng.blzb.widget.LinearTopSmoothScroller
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.decoration.GridSpaceItemDecoration
|
||||
import com.example.base.extensions.getColor
|
||||
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.utils.DensityUtils
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import com.example.base.utils.SpanUtils
|
||||
import kotlin.math.ceil
|
||||
|
||||
class GuideItem4Fragment : BaseFragment<FragmentGuideItem4Binding, GuideViewModel>() {
|
||||
private val mAdapter by lazy { GuideItem4Adapter() }
|
||||
private val area1Adapter by lazy { GuideItem4Area1Adapter() }
|
||||
|
||||
private val selectedAdapter by lazy { GuideItem4SelectedAdapter() }
|
||||
|
||||
private val hotWordChildList = mutableListOf<HotWordEntity.Child>()
|
||||
|
||||
private var tabIndex = 0
|
||||
|
||||
private var page = 0
|
||||
private val area2Adapter by lazy { GuideItem4Area2Adapter() }
|
||||
|
||||
private var canClick = false
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.mRecyclerView.adapter = mAdapter
|
||||
binding.mRecyclerView.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
||||
binding.btnNext.typeface = Constants.almmsht
|
||||
|
||||
binding.rvSelectedKeywords.adapter = selectedAdapter
|
||||
binding.rvSelectedKeywords.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
||||
selectedAdapter.addData(HotWordEntity.Child(id = -1, name = "自定义", isChecked = true))
|
||||
setKeywordCount()
|
||||
binding.rvArea1.adapter = area1Adapter
|
||||
binding.rvArea2.adapter = area2Adapter
|
||||
}
|
||||
|
||||
override fun onLazyLoad() {
|
||||
super.onLazyLoad()
|
||||
hotWordChildList.addAll(GuideFragment.hotWordList)
|
||||
hotWordChildList.forEach { item ->
|
||||
binding.tabLayout.addView(createTab(item.name))
|
||||
if (UserConfigManager.getAreaList().isNotEmpty()) {
|
||||
setData()
|
||||
} else {
|
||||
mViewModel.getCityList()
|
||||
}
|
||||
|
||||
startAnim()
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.tabLayout.observeIndexChange { fromIndex, toIndex, _, _ ->
|
||||
page = 0
|
||||
tabIndex = toIndex
|
||||
area1Adapter.setOnItemClickListener { _, _, position ->
|
||||
val item = area1Adapter.getItem(position)
|
||||
area1Adapter.data.find { it.isChecked }?.isChecked = false
|
||||
item.isChecked = true
|
||||
|
||||
if (fromIndex >= 0) {
|
||||
val textView = binding.tabLayout.getChildAt(fromIndex)
|
||||
textView.setBackgroundResource(0)
|
||||
}
|
||||
if (toIndex >= 0) {
|
||||
val textView = binding.tabLayout.getChildAt(toIndex)
|
||||
textView.setBackgroundResource(R.drawable.shape_f5f8ff_top_cor16)
|
||||
}
|
||||
|
||||
val hotWordChild = hotWordChildList[toIndex]
|
||||
binding.tvAmount.text = "${hotWordChild.amount}亿元"
|
||||
|
||||
val keywordList = mutableListOf<HotWordEntity.Child>()
|
||||
for (i in 0 until 15) {
|
||||
keywordList.add(hotWordChild.children[i])
|
||||
}
|
||||
mAdapter.setList(keywordList)
|
||||
scrollToPosition(position)
|
||||
}
|
||||
|
||||
binding.ivRefresh.onClick {
|
||||
startRotate()
|
||||
val hotWordChild = hotWordChildList[tabIndex]
|
||||
if (ceil(hotWordChild.children.size / 15.0) > page + 1) {
|
||||
page++
|
||||
} else {
|
||||
page = 0
|
||||
area2Adapter.setOnCityClickListener {
|
||||
val selectList = mutableListOf<AreaEntity>()
|
||||
area2Adapter.data.forEach { area ->
|
||||
selectList.addAll(area.children.filter { it.isChecked })
|
||||
}
|
||||
val keywordList = mutableListOf<HotWordEntity.Child>()
|
||||
for (i in page * 15 until ((page + 1) * 15).coerceAtMost(hotWordChild.children.size)) {
|
||||
keywordList.add(hotWordChild.children[i])
|
||||
}
|
||||
mAdapter.setList(keywordList)
|
||||
binding.tvCityCount.text = "${selectList.size}"
|
||||
}
|
||||
|
||||
binding.ivBtn.onClick {
|
||||
if (!canClick) return@onClick
|
||||
if (selectedAdapter.data.size == 1) {
|
||||
toast("请添加关键词")
|
||||
return@onClick
|
||||
}
|
||||
val keywords = selectedAdapter.data.filter { it.id != -1 }.map { it.name }
|
||||
val cityIds = GuideFragment.cityList.map { it.id }
|
||||
mViewModel.getTotalBidInfo(keywords.joinToString(","), cityIds.joinToString(","), "${hotWordChildList.size}")
|
||||
}
|
||||
binding.rvArea2.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||
super.onScrolled(recyclerView, dx, dy)
|
||||
val layoutManager = binding.rvArea2.layoutManager as LinearLayoutManager
|
||||
val firstPosition = layoutManager.findFirstCompletelyVisibleItemPosition()
|
||||
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
if (!canClick) return@setOnItemClickListener
|
||||
val item = mAdapter.getItem(i)
|
||||
if (!item.isChecked && selectedAdapter.data.size == 6) {
|
||||
toast("最多添加5个关键词")
|
||||
return@setOnItemClickListener
|
||||
}
|
||||
|
||||
item.isChecked = !item.isChecked
|
||||
mAdapter.notifyDataSetChanged()
|
||||
if (item.isChecked) {
|
||||
selectedAdapter.addData(item)
|
||||
} else {
|
||||
selectedAdapter.remove(item)
|
||||
}
|
||||
setKeywordCount()
|
||||
}
|
||||
|
||||
selectedAdapter.setOnItemClickListener { _, _, i ->
|
||||
val item = selectedAdapter.getItem(i)
|
||||
if (item.id == -1) {
|
||||
if (selectedAdapter.data.size == 6) {
|
||||
toast("最多添加5个关键词")
|
||||
return@setOnItemClickListener
|
||||
if (firstPosition >= 0) {
|
||||
val firstItem = area1Adapter.getItem(firstPosition)
|
||||
area1Adapter.data.find { it.isChecked }?.isChecked = false
|
||||
firstItem.isChecked = true
|
||||
area1Adapter.notifyDataSetChanged()
|
||||
}
|
||||
val f = AddKeywordDialog.newInstance()
|
||||
f.setOnBackListener {
|
||||
selectedAdapter.addData(HotWordEntity.Child(name = it, isChecked = true))
|
||||
setKeywordCount()
|
||||
}
|
||||
f.show(childFragmentManager, "")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
selectedAdapter.setOnItemChildClickListener { _, view, i ->
|
||||
val item = selectedAdapter.getItem(i)
|
||||
if (!canClick || item.id == -1) return@setOnItemChildClickListener
|
||||
if (view.id == R.id.iv_delete) {
|
||||
selectedAdapter.remove(item)
|
||||
item.isChecked = false
|
||||
mAdapter.notifyDataSetChanged()
|
||||
setKeywordCount()
|
||||
binding.btnNext.onClick {
|
||||
if (canClick) {
|
||||
val selectList = mutableListOf<AreaEntity>()
|
||||
area1Adapter.data.forEach { area ->
|
||||
selectList.addAll(area.children.filter { it.isChecked })
|
||||
}
|
||||
if (selectList.isEmpty()) {
|
||||
toast("请选择地区")
|
||||
return@onClick
|
||||
}
|
||||
GuideFragment.cityList.addAll(selectList)
|
||||
RxBus.defaultInstance.post(GuideEvent(2))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.totalLiveData.observe(this) {
|
||||
GuideFragment.totalInfo = it
|
||||
RxBus.defaultInstance.post(GuideEvent(4))
|
||||
mViewModel.cityLiveData.observe(this) {
|
||||
UserConfigManager.saveAreaList(it)
|
||||
setData()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setKeywordCount() {
|
||||
SpanUtils.with(binding.tvKeywordsCount)
|
||||
.append("已添加关键词(")
|
||||
.append("${selectedAdapter.data.size - 1}")
|
||||
.setForegroundColor(getColor(R.color.color_ff493c))
|
||||
.append("/5)")
|
||||
.create()
|
||||
private fun setData() {
|
||||
val areaList = UserConfigManager.getAreaList()
|
||||
areaList.add(0, AreaEntity(0, name = "全国地区", isChecked = true))
|
||||
area1Adapter.setList(areaList)
|
||||
area2Adapter.setList(areaList)
|
||||
startAnim()
|
||||
}
|
||||
|
||||
private fun createTab(title: String): TextView {
|
||||
val textView = TextView(requireContext())
|
||||
textView.text = title
|
||||
textView.gravity = Gravity.CENTER
|
||||
textView.setPadding(DensityUtils.dp2px(14f) , 0, DensityUtils.dp2px(14f), 0)
|
||||
return textView
|
||||
}
|
||||
|
||||
private fun startRotate() {
|
||||
if (binding.ivRefresh.animation != null) {
|
||||
binding.ivRefresh.animation.cancel()
|
||||
}
|
||||
val anim = RotateAnimation(0f, 360f, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f)
|
||||
anim.duration = 1000
|
||||
binding.ivRefresh.startAnimation(anim)
|
||||
private fun scrollToPosition(position: Int) {
|
||||
binding.rvArea2.layoutManager?.startSmoothScroll(
|
||||
LinearTopSmoothScroller(requireContext(), true)
|
||||
.apply { targetPosition = position }
|
||||
)
|
||||
}
|
||||
|
||||
private fun startAnim() {
|
||||
val keyword1TransAnim = ObjectAnimator.ofFloat(binding.layoutKeywords, "translationY", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
||||
keyword1TransAnim.duration = 1000
|
||||
keyword1TransAnim.startDelay = 200
|
||||
keyword1TransAnim.addListener(onStart = {
|
||||
binding.layoutKeywords.visible()
|
||||
})
|
||||
|
||||
val keyword2TransAnim = ObjectAnimator.ofFloat(binding.layoutSelectedKeywords, "translationY", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
||||
keyword2TransAnim.duration = 1000
|
||||
keyword2TransAnim.startDelay = 600
|
||||
keyword2TransAnim.addListener(onStart = {
|
||||
binding.layoutSelectedKeywords.visible()
|
||||
})
|
||||
|
||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationX", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
titleTransAnim.duration = 1000
|
||||
titleTransAnim.startDelay = 200
|
||||
titleTransAnim.startDelay = 600
|
||||
titleTransAnim.addListener(onStart = {
|
||||
binding.ivTitle.visible()
|
||||
})
|
||||
|
||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationX", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
descTransAnim.duration = 1000
|
||||
titleTransAnim.startDelay = 200
|
||||
descTransAnim.startDelay = 600
|
||||
descTransAnim.addListener(onStart = {
|
||||
binding.ivDesc.visible()
|
||||
})
|
||||
|
||||
val btnTransAnim = ObjectAnimator.ofFloat(binding.ivBtn, "translationY", DensityUtils.dp2px(100f).toFloat(), 0f)
|
||||
val contentTransAnim = ObjectAnimator.ofFloat(binding.layoutContent, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||
contentTransAnim.duration = 1000
|
||||
contentTransAnim.addListener(onStart = {
|
||||
binding.layoutContent.visible()
|
||||
})
|
||||
|
||||
val icon1TransAnim = ObjectAnimator.ofFloat(binding.ivIcon1, "translationX", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
icon1TransAnim.duration = 1000
|
||||
icon1TransAnim.startDelay = 600
|
||||
icon1TransAnim.addListener(onStart = {
|
||||
binding.ivIcon1.visible()
|
||||
})
|
||||
|
||||
val icon2TransAnim = ObjectAnimator.ofFloat(binding.ivIcon2, "translationY", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
icon2TransAnim.duration = 1000
|
||||
icon2TransAnim.startDelay = 400
|
||||
icon2TransAnim.addListener(onStart = {
|
||||
binding.ivIcon2.visible()
|
||||
})
|
||||
|
||||
val countTransAnim = ObjectAnimator.ofFloat(binding.tvCityCount, "translationY", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
countTransAnim.duration = 1000
|
||||
countTransAnim.startDelay = 400
|
||||
countTransAnim.addListener(onStart = {
|
||||
binding.tvCityCount.visible()
|
||||
})
|
||||
|
||||
val btnTransAnim = ObjectAnimator.ofFloat(binding.btnNext, "translationY", DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
btnTransAnim.duration = 1000
|
||||
btnTransAnim.startDelay = 800
|
||||
btnTransAnim.interpolator = LinearInterpolator()
|
||||
btnTransAnim.startDelay = 400
|
||||
btnTransAnim.addListener(onStart = {
|
||||
binding.ivBtn.visible()
|
||||
binding.btnNext.visible()
|
||||
}, onEnd = {
|
||||
canClick = true
|
||||
})
|
||||
|
||||
val animSet = AnimatorSet()
|
||||
animSet.playTogether(
|
||||
keyword1TransAnim,
|
||||
keyword2TransAnim,
|
||||
titleTransAnim,
|
||||
descTransAnim,
|
||||
btnTransAnim
|
||||
)
|
||||
animSet.playTogether(titleTransAnim, descTransAnim, contentTransAnim, icon1TransAnim, icon2TransAnim, countTransAnim, btnTransAnim)
|
||||
animSet.start()
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,10 @@ import com.example.base.utils.ClipboardUtils
|
|||
/**
|
||||
* 我的
|
||||
*/
|
||||
class MineFragment : BaseFragment<FragmentMineBinding, MineViewModel>() {
|
||||
class
|
||||
|
||||
|
||||
MineFragment : BaseFragment<FragmentMineBinding, MineViewModel>() {
|
||||
private var userInfo: UserEntity? = null
|
||||
|
||||
private var isInit = true
|
||||
|
|
@ -224,7 +227,7 @@ class MineFragment : BaseFragment<FragmentMineBinding, MineViewModel>() {
|
|||
error(R.mipmap.ic_default_avatar)
|
||||
}
|
||||
|
||||
if (userInfo?.vip == "1") {
|
||||
if (userInfo?.vip == "1" || userInfo?.vip == "10") {
|
||||
isEnterprise = false
|
||||
|
||||
binding.tvVipName.text = "开通会员"
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ class InvoiceFragment : BaseFragment<FragmentInvoiceBinding, InvoiceViewModel>()
|
|||
|
||||
private fun commit() {
|
||||
val enterpriseName = binding.etEnterpriseName.text.toString().trim()
|
||||
val enterpriseCode = binding.etEnterpriseCode.toString().trim()
|
||||
val enterpriseCode = binding.etEnterpriseCode.text.toString().trim()
|
||||
val enterpriseAddress = binding.etEnterpriseAddress.text.toString().trim()
|
||||
val enterprisePhone = binding.etEnterprisePhone.text.toString().trim()
|
||||
val bankName = binding.etBankName.text.toString().trim()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_15"/>
|
||||
<gradient android:startColor="#2747C2" android:endColor="#4E71EB"/>
|
||||
<stroke android:width="0.5dp" android:color="@color/white"/>
|
||||
</shape>
|
||||
|
|
@ -4,133 +4,177 @@
|
|||
xmlns:tool="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_guide_bg">
|
||||
android:background="#00071A">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_layer1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item1_layer1"
|
||||
<ImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:src="@mipmap/ic_guide_item1_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="fitXY"
|
||||
android:visibility="invisible"
|
||||
android:scaleX="2"
|
||||
android:scaleY="2"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
tool:visibility="visible"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_layer2"
|
||||
<ImageView
|
||||
android:id="@+id/iv_flow"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="invisible"
|
||||
tool:visibility="visible"
|
||||
android:src="@mipmap/ic_guide_item1_flow"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_27"
|
||||
android:layout_marginTop="@dimen/dp_54"
|
||||
android:layout_marginEnd="@dimen/dp_27"
|
||||
android:background="@mipmap/ic_guide_item1_title_bg"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintDimensionRatio="h,326:188"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_34"
|
||||
android:layout_marginTop="@dimen/dp_37"
|
||||
android:text="官宣\n应用"
|
||||
android:textColor="@color/color_e6ffff"
|
||||
android:textSize="@dimen/sp_30"
|
||||
app:layout_constraintEnd_toStartOf="@id/divider"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="@color/color_e6ffff"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_title"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_app_name"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_40"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/color_e6ffff"
|
||||
android:textSize="36sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_sub_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/divider"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_sub_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="# 招标大数据尽在掌握"
|
||||
android:textColor="@color/color_e6ffff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_title"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_app_name"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_app_name" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_desc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_marginStart="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_32"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:background="@drawable/shape_guide_item1_desc_bg"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="· 实时更新"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:text="全国数据收集,海量信息采集"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_light"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/ic_guide_item1_title_light"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintDimensionRatio="w,149:180"
|
||||
tool:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_company"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
tool:listitem="@layout/listitem_guide_item1_company"
|
||||
android:background="@mipmap/ic_guide_item1_rv_bg"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="invisible"
|
||||
tool:visibility="visible"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_title" />
|
||||
|
||||
<org.libpag.PAGImageView
|
||||
android:id="@+id/pagView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleX="1.4"
|
||||
android:scaleY="1.4"
|
||||
android:src="@mipmap/ic_guide_item1_layer2"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_company"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_btn"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:visibility="invisible"
|
||||
tool:visibility="visible"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_btn"
|
||||
android:layout_width="214dp"
|
||||
android:layout_height="@dimen/dp_70"
|
||||
android:layout_marginBottom="@dimen/dp_34"
|
||||
android:background="@mipmap/ic_guide_item1_btn"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_layer3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item1_layer3"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginBottom="@dimen/dp_20"
|
||||
android:scaleX="1.1"
|
||||
android:scaleY="1.1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginTop="-30dp"
|
||||
android:src="@mipmap/ic_guide_item1_icon1"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_layer3"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_layer3"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:src="@mipmap/ic_guide_item1_icon2"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_layer3"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_layer3"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon1"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_icon1"
|
||||
android:layout_marginEnd="@dimen/dp_120"
|
||||
android:layout_marginTop="-10dp"
|
||||
android:src="@mipmap/ic_guide_item1_icon3"
|
||||
android:visibility="invisible"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_50"
|
||||
android:src="@mipmap/ic_guide_item1_icon4"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon2"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_icon2"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_42"
|
||||
android:src="@mipmap/ic_guide_item1_title"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:src="@mipmap/ic_guide_item1_desc"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:src="@mipmap/ic_guide_item1_btn"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tool:visibility="visible" />
|
||||
<TextView
|
||||
android:id="@+id/tv_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:drawableStart="@mipmap/ic_guide_item1_arrow_l"
|
||||
android:drawableEnd="@mipmap/ic_guide_item1_arrow_r"
|
||||
android:drawablePadding="@dimen/dp_8"
|
||||
android:text="开启大数据时代"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_17"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -7,24 +7,26 @@
|
|||
android:background="@mipmap/ic_guide_bg">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon1"
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:src="@mipmap/ic_guide_item2_icon1"
|
||||
android:visibility="invisible"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:scaleX="1.5"
|
||||
android:scaleY="1.5"
|
||||
android:src="@mipmap/ic_guide_item3_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_42"
|
||||
android:src="@mipmap/ic_guide_item2_title"
|
||||
android:src="@mipmap/ic_guide_item3_title"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
|
@ -33,114 +35,387 @@
|
|||
android:id="@+id/iv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:src="@mipmap/ic_guide_item2_desc"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:src="@mipmap/ic_guide_item3_desc"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
android:background="@drawable/shape_white_cor16"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:src="@mipmap/ic_guide_item3_btn"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_desc"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_60"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option3"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_desc"
|
||||
tool:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:drawableStart="@mipmap/ic_guide_item2_title_left"
|
||||
android:drawableEnd="@mipmap/ic_guide_item2_title_right"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="实时数据更新"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_16"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon1"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_area1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@drawable/shape_guide_area_bg"
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
app:layout_constraintWidth_percent="0.33"
|
||||
tool:listitem="@layout/listitem_guide_area1" />
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon1"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon1" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_area2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
<TextView
|
||||
android:id="@+id/tv_name1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="工程建筑"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/rv_area1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
tool:listitem="@layout/listitem_guide_area2" />
|
||||
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon1" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon2"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_27"
|
||||
android:src="@mipmap/ic_guide_item2_icon2"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option1"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon2"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="工业制造"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btn_next"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tool:visibility="visible" />
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible">
|
||||
|
||||
<com.cheng.blzb.widget.CommonShapeView
|
||||
android:id="@+id/tv_city_count"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon3"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon3"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="通讯媒体"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon3" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_5"
|
||||
android:paddingEnd="@dimen/dp_5"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_37"
|
||||
android:visibility="invisible"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="#F13838"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon2"
|
||||
tool:visibility="visible" />
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option8"
|
||||
app:layout_constraintEnd_toEndOf="@id/layout_option8"
|
||||
tool:visibility="visible">
|
||||
|
||||
<com.cheng.blzb.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="@dimen/dp_190"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon4"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon4"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="商业环卫"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon4" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_35"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:visibility="invisible"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_icon2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option2"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon5"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon5"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon5" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="科学教育"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon5" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_44"
|
||||
android:layout_marginTop="-30dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toEndOf="@id/layout_option5"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option5"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon6"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon6"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon6"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon6" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="交通运输"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon6" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon2"
|
||||
tool:visibility="visible" />
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon7"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon7"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon7"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="能源产业"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon7" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/layout_option6"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon8"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item2_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon8"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="其他"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon8" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -6,25 +6,12 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_guide_bg">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:scaleX="1.5"
|
||||
android:scaleY="1.5"
|
||||
android:src="@mipmap/ic_guide_item3_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_42"
|
||||
android:src="@mipmap/ic_guide_item3_title"
|
||||
android:src="@mipmap/ic_guide_item4_title"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -36,7 +23,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:src="@mipmap/ic_guide_item3_desc"
|
||||
android:src="@mipmap/ic_guide_item4_desc"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -56,365 +43,129 @@
|
|||
tool:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option1"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/layout_keywords"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_60"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option3"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_desc"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon1"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon1"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="工程建筑"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon1" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option1"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon2"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="工业制造"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon2" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon3"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon3"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="通讯媒体"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon3" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:layout_marginBottom="@dimen/dp_37"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option8"
|
||||
app:layout_constraintEnd_toEndOf="@id/layout_option8"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon4"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon4"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon4" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="商业环卫"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon4" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_35"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_f5f8ff_cor16"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option2"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_desc"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon5"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<com.angcyo.tablayout.DslTabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:background="@drawable/shape_white_top_cor16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tab_deselect_color="#929DB6"
|
||||
app:tab_enable_gradient_text_size="false"
|
||||
app:tab_enable_text_bold="true"
|
||||
app:tab_item_auto_equ_width="false"
|
||||
app:tab_select_color="@color/color_125ffe"
|
||||
app:tab_text_max_size="@dimen/sp_14"
|
||||
app:tab_text_min_size="@dimen/sp_14" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check5"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_base_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon5"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon5" />
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/tabLayout">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name5"
|
||||
android:layout_width="wrap_content"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:text="行业交易规模"
|
||||
android:textColor="#3B3F47"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:drawableStart="@mipmap/ic_guide_fire"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="877.78亿"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:src="@mipmap/ic_refresh_guide_keywords" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="科学教育"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon5" />
|
||||
android:layout_margin="@dimen/dp_14"
|
||||
android:background="@drawable/shape_white_cor14"
|
||||
android:overScrollMode="never"
|
||||
android:padding="@dimen/dp_14"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_base_info"
|
||||
app:spanCount="3"
|
||||
tool:itemCount="18"
|
||||
tool:listitem="@layout/listitem_guide_item3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option6"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/layout_selected_keywords"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_44"
|
||||
android:layout_marginTop="-30dp"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_f5f8ff_cor16"
|
||||
android:padding="@dimen/dp_14"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toEndOf="@id/layout_option5"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option5"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_keywords"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon6"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon6"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
<TextView
|
||||
android:id="@+id/tv_keywords_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="已添加关键词(5/5)"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check6"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_selected_keywords"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon6"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon6" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name6"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="交通运输"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon6" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option3"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon7"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon7"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon7"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon7" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name7"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="能源产业"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon7" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_option8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/layout_option6"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon8"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:src="@mipmap/ic_guide_item3_icon8"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_check8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_icon8"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name8"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="其他"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_icon8" />
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@drawable/shape_white_cor14"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_keywords_count"
|
||||
app:spanCount="3"
|
||||
tool:itemCount="5"
|
||||
tool:listitem="@layout/listitem_guide3_selected_keyword" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,14 +6,25 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_guide_bg">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:src="@mipmap/ic_guide_item2_icon1"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_42"
|
||||
android:src="@mipmap/ic_guide_item4_title"
|
||||
android:src="@mipmap/ic_guide_item2_title"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
|
@ -22,151 +33,114 @@
|
|||
android:id="@+id/iv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:src="@mipmap/ic_guide_item4_desc"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:src="@mipmap/ic_guide_item2_desc"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_btn"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:src="@mipmap/ic_guide_item3_btn"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_keywords"
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_f5f8ff_cor16"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_25"
|
||||
android:background="@drawable/shape_white_cor16"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_desc"
|
||||
tool:visibility="visible">
|
||||
|
||||
<com.angcyo.tablayout.DslTabLayout
|
||||
android:id="@+id/tabLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_38"
|
||||
android:background="@drawable/shape_white_top_cor16"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:tab_deselect_color="#929DB6"
|
||||
app:tab_enable_gradient_text_size="false"
|
||||
app:tab_enable_text_bold="true"
|
||||
app:tab_item_auto_equ_width="false"
|
||||
app:tab_select_color="@color/color_125ffe"
|
||||
app:tab_text_max_size="@dimen/sp_14"
|
||||
app:tab_text_min_size="@dimen/sp_14" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_base_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_11"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/tabLayout">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:text="行业交易规模"
|
||||
android:textColor="#3B3F47"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_amount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:drawableStart="@mipmap/ic_guide_fire"
|
||||
android:drawablePadding="@dimen/dp_2"
|
||||
android:gravity="center"
|
||||
android:text="877.78亿"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_refresh"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:src="@mipmap/ic_refresh_guide_keywords" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/dp_14"
|
||||
android:background="@drawable/shape_white_cor14"
|
||||
android:overScrollMode="never"
|
||||
android:padding="@dimen/dp_14"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_base_info"
|
||||
app:spanCount="3"
|
||||
tool:itemCount="18"
|
||||
tool:listitem="@layout/listitem_guide_item4" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_selected_keywords"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_f5f8ff_cor16"
|
||||
android:padding="@dimen/dp_14"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_keywords"
|
||||
tool:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_keywords_count"
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="已添加关键词(5/5)"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:drawableStart="@mipmap/ic_guide_item2_title_left"
|
||||
android:drawableEnd="@mipmap/ic_guide_item2_title_right"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="实时数据更新"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_selected_keywords"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@drawable/shape_white_cor14"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_keywords_count"
|
||||
app:spanCount="3"
|
||||
tool:itemCount="5"
|
||||
tool:listitem="@layout/listitem_guide4_selected_keyword" />
|
||||
android:id="@+id/rv_area1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@drawable/shape_guide_area_bg"
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
app:layout_constraintWidth_percent="0.33"
|
||||
tool:listitem="@layout/listitem_guide_area1" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_area2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:orientation="vertical"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/rv_area1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
tool:listitem="@layout/listitem_guide_area2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_icon2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_27"
|
||||
android:src="@mipmap/ic_guide_item2_icon2"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btn_next"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<com.cheng.blzb.widget.CommonShapeView
|
||||
android:id="@+id/tv_city_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_5"
|
||||
android:paddingEnd="@dimen/dp_5"
|
||||
android:text="0"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="invisible"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="#F13838"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon2"
|
||||
tool:visibility="visible" />
|
||||
|
||||
<com.cheng.blzb.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="@dimen/dp_190"
|
||||
android:layout_height="@dimen/dp_50"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:visibility="invisible"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_icon2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_icon2"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_icon2"
|
||||
tool:visibility="visible" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?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_28"
|
||||
android:layout_marginStart="@dimen/dp_20">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="重庆**有限公司项目招标,投资18.67亿元"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:src="@mipmap/ic_guide_item4_checked"
|
||||
android:src="@mipmap/ic_guide_item3_checked"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 773 KiB |
|
After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 165 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 372 B |
|
|
@ -135,4 +135,5 @@
|
|||
<color name="color_20f3e6">#20F3E6</color>
|
||||
<color name="color_05ace8">#05ACE8</color>
|
||||
<color name="color_6dd9f2">#6DD9F2</color>
|
||||
<color name="color_e6ffff">#E6FFFF</color>
|
||||
</resources>
|
||||