添加第一个和第二个引导页

This commit is contained in:
wangyu 2026-01-09 15:49:39 +08:00
parent 70ea3d320c
commit 3919ad489d
91 changed files with 740 additions and 50 deletions

View File

@ -1,5 +1,6 @@
package com.cheng.blzb.bean
import com.cheng.blzb.R
import java.io.Serializable
class AreaEntity(
@ -9,4 +10,42 @@ class AreaEntity(
val amount: String = "",
var children: MutableList<AreaEntity> = mutableListOf(),
var isChecked: Boolean = false
) : Serializable
) : Serializable {
fun getCityImage(): Int {
return when(name) {
"北京" -> R.mipmap.ic_city1
"天津" -> R.mipmap.ic_city2
"河北" -> R.mipmap.ic_city3
"山西" -> R.mipmap.ic_city4
"内蒙古" -> R.mipmap.ic_city5
"广东" -> R.mipmap.ic_city6
"广西" -> R.mipmap.ic_city7
"海南" -> R.mipmap.ic_city8
"山东" -> R.mipmap.ic_city9
"江苏" -> R.mipmap.ic_city10
"安徽" -> R.mipmap.ic_city11
"浙江" -> R.mipmap.ic_city12
"上海" -> R.mipmap.ic_city13
"福建" -> R.mipmap.ic_city14
"湖北" -> R.mipmap.ic_city15
"河南" -> R.mipmap.ic_city16
"湖南" -> R.mipmap.ic_city17
"江西" -> R.mipmap.ic_city18
"宁夏" -> R.mipmap.ic_city19
"新疆" -> R.mipmap.ic_city20
"青海" -> R.mipmap.ic_city21
"陕西" -> R.mipmap.ic_city22
"甘肃" -> R.mipmap.ic_city23
"四川" -> R.mipmap.ic_city24
"云南" -> R.mipmap.ic_city25
"贵州" -> R.mipmap.ic_city26
"西藏" -> R.mipmap.ic_city27
"重庆" -> R.mipmap.ic_city28
"辽宁" -> R.mipmap.ic_city29
"吉林" -> R.mipmap.ic_city30
"黑龙江" -> R.mipmap.ic_city31
else -> 0
}
}
}

View File

@ -5,6 +5,7 @@ import android.text.TextUtils
import androidx.lifecycle.MutableLiveData
import com.cheng.blzb.bean.BidTypeEntity
import com.cheng.blzb.bean.AreaEntity
import com.cheng.blzb.bean.HotWordEntity
import com.cheng.blzb.net.ApiFactory
import com.example.base.extensions.toast
import com.example.base.utils.MMKVUtils
@ -266,6 +267,21 @@ object UserConfigManager {
return emptyList()
}
/**
* 引导页热词
*/
fun saveGuideKeywords(list: List<HotWordEntity>) {
MMKVUtils.put("guide_keywords", Gson().toJson(list))
}
fun getGuideKeywords(): List<HotWordEntity> {
val str = MMKVUtils.getString("guide_keywords")
if (!TextUtils.isEmpty(str)) {
return Gson().fromJson(str, object : TypeToken<List<HotWordEntity>>() {}.type)
}
return emptyList()
}
/**
* 保存个推cid
*/

View File

@ -115,8 +115,8 @@ class LauncherActivity : BaseActivity() {
LoginActivity.start(this@LauncherActivity)
}
} else {
startActivity<MainActivity>()
// startActivity<GuideActivity>()
// startActivity<MainActivity>()
startActivity<GuideActivity>()
}
finish()
}

View File

@ -18,6 +18,7 @@ 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.GuideItem2Fragment
import com.cheng.blzb.ui.fragment.mine.vip.VipFragment
import com.example.base.common.RxBus
import org.jetbrains.anko.startActivity
@ -40,7 +41,7 @@ class GuideFragment :BaseFragment<FragmentGuideContentBinding, GuideViewModel>()
private fun initFragment() {
fragmentList.add(GuideItem1Fragment())
// fragmentList.add(GuideItem2Fragment())
fragmentList.add(GuideItem2Fragment())
// fragmentList.add(GuideItem3Fragment())
// fragmentList.add(GuideItem4Fragment())
// fragmentList.add(GuideItem5Fragment())
@ -48,6 +49,8 @@ class GuideFragment :BaseFragment<FragmentGuideContentBinding, GuideViewModel>()
override fun initData() {
super.initData()
mViewModel.getHotWordList()
mViewModel.getCityList()
EventReportManager.eventReport(EventConstants.GUIDE_LAUNCH, "", "")
}
@ -73,6 +76,14 @@ class GuideFragment :BaseFragment<FragmentGuideContentBinding, GuideViewModel>()
override fun initObserve() {
super.initObserve()
mViewModel.hotWordLiveData.observe(this) {
UserConfigManager.saveGuideKeywords(it)
}
mViewModel.cityLiveData.observe(this) {
UserConfigManager.saveAreaList(it)
}
val guideEvent = RxBus.defaultInstance.toObservable(GuideEvent::class.java).subscribe {
if (it.nextPage) {
binding.viewPager.currentItem += 1

View File

@ -1,6 +1,79 @@
package com.cheng.blzb.ui.fragment.guide
import androidx.lifecycle.MutableLiveData
import com.cheng.blzb.bean.AreaEntity
import com.cheng.blzb.bean.GuideTotalBidEntity
import com.cheng.blzb.bean.GuideUpdateEntity
import com.cheng.blzb.bean.HotWordEntity
import com.cheng.blzb.net.ApiFactory
import com.example.base.extensions.toast
import com.example.base.utils.L
import com.example.base.viewmodel.BaseViewModel
class GuideViewModel :BaseViewModel(){
val hotWordLiveData = MutableLiveData<List<HotWordEntity>>()
val cityLiveData = MutableLiveData<List<AreaEntity>>()
val userCityLiveData = MutableLiveData<AreaEntity>()
val totalLiveData = MutableLiveData<GuideTotalBidEntity>()
val updateLiveData = MutableLiveData<List<GuideUpdateEntity>>()
fun getHotWordList() {
launchOnUiTryCatch({
val response = ApiFactory.apiService.getHotWordList()
if (response.status) {
hotWordLiveData.postValue(response.data)
} else toast(response.message, true)
}, {
setError(it)
L.d(it)
})
}
fun getCityList() {
launchOnUiTryCatch({
val response = ApiFactory.apiService.getAreaList()
if (response.status) {
cityLiveData.postValue(response.data)
} else toast(response.message, true)
}, {
setError(it)
L.d(it)
})
}
fun getUserCity() {
launchOnUiTryCatch({
val response = ApiFactory.apiService.getUserCity()
if (response.status) {
userCityLiveData.postValue(response.data)
} else toast(response.message, true)
}, {
setError(it)
L.d(it)
})
}
fun getTotalBidInfo(keywords: String, cityIds: String, kindNum: String) {
launchOnUiTryCatch({
val response = ApiFactory.apiService.getTotalBidInfo(keywords, cityIds, kindNum)
if (response.status) {
totalLiveData.postValue(response.data)
} else toast(response.message, true)
}, {
setError(it)
L.d(it)
})
}
fun getUpdateNum() {
launchOnUiTryCatch({
val response = ApiFactory.apiService.getUpdateNum("8")
if (response.status) {
updateLiveData.postValue(response.data)
} else toast(response.message, true)
}, {
setError(it)
L.d(it)
})
}
}

View File

@ -1,13 +0,0 @@
package com.cheng.blzb.ui.fragment.guide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cheng.blzb.R
class IndicatorAdapter: BaseQuickAdapter<Int, BaseViewHolder>(R.layout.listitem_indicator) {
var currentIndex = 0
override fun convert(holder: BaseViewHolder, item: Int) {
holder.setImageResource(R.id.iv_indicator, if (item == currentIndex) R.drawable.shape_indicator_select else R.drawable.shape_indicator_default)
}
}

View File

@ -0,0 +1,19 @@
package com.cheng.blzb.ui.fragment.guide.adapter
import android.graphics.Color
import android.graphics.Typeface
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cheng.blzb.R
import com.cheng.blzb.bean.AreaEntity
import com.example.base.extensions.getColor
class GuideItem2AreaAdapter: BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_area) {
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))
holder.getView<TextView>(R.id.tv_name).typeface = if (item.isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT
holder.itemView.setBackgroundColor(if (item.isChecked) Color.WHITE else Color.TRANSPARENT)
}
}

View File

@ -0,0 +1,15 @@
package com.cheng.blzb.ui.fragment.guide.adapter
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.cheng.blzb.R
import com.cheng.blzb.bean.AreaEntity
class GuideItem2CityAdapter: 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)
holder.setText(R.id.tv_amount, "${item.amount}亿元")
holder.setVisible(R.id.iv_check, item.isChecked)
}
}

View File

@ -4,20 +4,22 @@ import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.animation.PropertyValuesHolder
import android.view.ViewTreeObserver
import android.view.animation.LinearInterpolator
import androidx.core.animation.addListener
import com.cheng.blzb.databinding.FragmentGuideItem1Binding
import com.cheng.blzb.ui.activity.MainActivity
import com.cheng.blzb.event.GuideEvent
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
import com.efs.sdk.memleaksdk.monitor.internal.bi
import com.example.base.common.RxBus
import com.example.base.extensions.onClick
import com.example.base.extensions.visible
import com.example.base.ui.BaseFragment
import org.jetbrains.anko.startActivity
import com.example.base.utils.DensityUtils
class GuideItem1Fragment: BaseFragment<FragmentGuideItem1Binding, GuideViewModel>() {
class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewModel>() {
private var canClick = false
override fun initView() {
super.initView()
override fun onLazyLoad() {
super.onLazyLoad()
binding.root.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
override fun onGlobalLayout() {
startAnim()
@ -29,13 +31,25 @@ class GuideItem1Fragment: BaseFragment<FragmentGuideItem1Binding, GuideViewModel
override fun initListener() {
super.initListener()
binding.ivBtn.onClick {
requireActivity().startActivity<MainActivity>()
if (canClick) {
RxBus.defaultInstance.post(GuideEvent(true))
}
}
}
private fun startAnim() {
val scaleXHolder1 = PropertyValuesHolder.ofFloat("scaleX", 0f, 1f)
val scaleYHolder1 = PropertyValuesHolder.ofFloat("scaleY", 0f, 1f)
val scaleXHolder1 = PropertyValuesHolder.ofFloat("scaleX", 0f, 1.1f)
val scaleYHolder1 = PropertyValuesHolder.ofFloat("scaleY", 0f, 1.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 layer1AlphaAnim = ObjectAnimator.ofFloat(binding.ivLayer1, "alpha", 0f, 1f)
layer1AlphaAnim.duration = 1600
layer1AlphaAnim.startDelay = 1600
layer1AlphaAnim.addListener(onStart = {
binding.ivLayer1.visible()
})
val layer2TransAnim = ObjectAnimator.ofFloat(binding.ivLayer2, "translationX", -binding.ivLayer2.width.toFloat(), 0f)
layer2TransAnim.duration = 1000
@ -50,8 +64,73 @@ class GuideItem1Fragment: BaseFragment<FragmentGuideItem1Binding, GuideViewModel
binding.ivLayer3.visible()
})
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
titleTransAnim.duration = 1000
titleTransAnim.startDelay = 1000
titleTransAnim.addListener(onStart = {
binding.ivTitle.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 icon1ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.ivIcon1, scaleXHolder2, scaleYHolder2)
icon1ScaleAnim.duration = 1000
icon1ScaleAnim.startDelay = 1400
icon1ScaleAnim.interpolator = LinearInterpolator()
icon1ScaleAnim.addListener(onStart = {
binding.ivIcon1.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)
btnScaleAnim.duration = 1000
btnScaleAnim.startDelay = 1800
btnScaleAnim.interpolator = LinearInterpolator()
btnScaleAnim.addListener(onStart = {
binding.ivBtn.visible()
}, onEnd = {
canClick = true
})
val animSet = AnimatorSet()
animSet.playTogether(layer2TransAnim, layer3ScaleAnim)
animSet.playTogether(
layer1AlphaAnim,
layer2TransAnim,
layer3ScaleAnim,
titleTransAnim,
descTransAnim,
icon1ScaleAnim,
icon2ScaleAnim,
icon3TransAnim,
icon4TransAnim,
btnScaleAnim
)
animSet.start()
}
}

View File

@ -0,0 +1,203 @@
package com.cheng.blzb.ui.fragment.guide.item
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import androidx.core.animation.addListener
import com.cheng.blzb.R
import com.cheng.blzb.bean.AreaEntity
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.GuideViewModel
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem2AreaAdapter
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem2CityAdapter
import com.example.base.common.RxBus
import com.example.base.decoration.GridSpaceItemDecoration
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
class GuideItem2Fragment: BaseFragment<FragmentGuideItem2Binding, GuideViewModel>() {
private val areaAdapter by lazy { GuideItem2AreaAdapter() }
private val cityAdapter by lazy { GuideItem2CityAdapter() }
private var isCountrywide = true
private var canClick = false
override fun initView() {
super.initView()
binding.btnNext.typeface = Constants.almmsht
binding.rvArea.adapter = areaAdapter
binding.rvCity.adapter = cityAdapter
binding.rvCity.addItemDecoration(GridSpaceItemDecoration(2, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
}
override fun initData() {
super.initData()
val areaList = UserConfigManager.getAreaList()
areaList.add(0, AreaEntity(0, name = "全国地区", isChecked = true))
areaAdapter.setList(areaList)
mViewModel.getUserCity()
}
override fun onLazyLoad() {
super.onLazyLoad()
startAnim()
}
override fun initListener() {
super.initListener()
areaAdapter.setOnItemClickListener { _, _, position ->
val item = areaAdapter.getItem(position)
areaAdapter.data.find { it.isChecked }?.isChecked = false
item.isChecked = true
areaAdapter.notifyDataSetChanged()
val cityList = item.children
cityAdapter.setList(item.children)
if (item.id == 0) {
updateCheckState(isCountrywide)
} else {
updateCheckState(cityList.all { it.isChecked })
}
}
cityAdapter.setOnItemClickListener { _, _, position ->
val item = cityAdapter.getItem(position)
item.isChecked = !item.isChecked
cityAdapter.notifyDataSetChanged()
updateCheckState(cityAdapter.data.all { it.isChecked })
isCountrywide = false
}
binding.tvCheckAll.onClick {
if (areaAdapter.data.find { it.isChecked }?.id == 0) {
isCountrywide = !isCountrywide
areaAdapter.data.forEach { area ->
area.children.forEach { city ->
city.isChecked = false
}
}
updateCheckState(isCountrywide)
} else {
if (cityAdapter.data.all { it.isChecked }) {
cityAdapter.data.forEach { it.isChecked = false }
} else {
cityAdapter.data.forEach { it.isChecked = true }
}
updateCheckState(cityAdapter.data.all { it.isChecked })
cityAdapter.notifyDataSetChanged()
isCountrywide = false
}
}
binding.btnNext.onClick {
if (canClick) {
val selectList = mutableListOf<AreaEntity>()
areaAdapter.data.forEach { area ->
selectList.addAll(area.children.filter { it.isChecked })
}
if (!isCountrywide && selectList.isEmpty()) {
toast("请选择地区")
return@onClick
}
if (isCountrywide) {
areaAdapter.data.forEach { area ->
selectList.addAll(area.children)
}
}
RxBus.defaultInstance.post(GuideEvent(true))
}
}
}
override fun initObserve() {
super.initObserve()
mViewModel.userCityLiveData.observe(this) {
if (it != null) {
areaAdapter.data.forEach { area ->
area.children.forEach { city ->
if (city.id == it.id) {
area.isChecked = true
city.isChecked = true
isCountrywide = false
areaAdapter.notifyDataSetChanged()
cityAdapter.setList(area.children)
updateCheckState(false)
return@observe
}
}
}
}
}
}
private fun startAnim() {
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationX", -DensityUtils.dp2px(200f).toFloat(), 0f)
titleTransAnim.duration = 1000
titleTransAnim.startDelay = 600
titleTransAnim.addListener(onStart = {
binding.ivTitle.visible()
})
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationX", -DensityUtils.dp2px(200f).toFloat(), 0f)
descTransAnim.duration = 1000
descTransAnim.startDelay = 600
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 btnTransAnim = ObjectAnimator.ofFloat(binding.btnNext, "translationY", DensityUtils.dp2px(200f).toFloat(), 0f)
btnTransAnim.duration = 1000
btnTransAnim.startDelay = 400
btnTransAnim.addListener(onStart = {
binding.btnNext.visible()
}, onEnd = {
canClick = true
})
val animSet = AnimatorSet()
animSet.playTogether(titleTransAnim, descTransAnim, contentTransAnim, icon1TransAnim, icon2TransAnim, btnTransAnim)
animSet.start()
}
private fun updateCheckState(isChecked: Boolean) {
if (isChecked) {
binding.tvCheckAll.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_check_true, 0, 0, 0)
} else {
binding.tvCheckAll.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_check_false, 0, 0, 0)
}
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_6" />
<solid android:color="#80000000" />
</shape>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#F1F6FF" />
<corners
android:bottomLeftRadius="@dimen/dp_16"
android:topLeftRadius="@dimen/dp_16" />
</shape>

View File

@ -4,7 +4,7 @@
xmlns:tool="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/ic_guide_item1_bg">
android:background="@mipmap/ic_guide_bg">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_layer1"
@ -12,6 +12,8 @@
android:layout_height="wrap_content"
android:src="@mipmap/ic_guide_item1_layer1"
android:visibility="invisible"
android:scaleX="2"
android:scaleY="2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -38,6 +40,10 @@
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"
@ -48,37 +54,36 @@
android:id="@+id/iv_icon1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_8"
android:layout_marginTop="@dimen/dp_50"
android:layout_marginBottom="@dimen/dp_5"
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_icon2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_50"
android:src="@mipmap/ic_guide_item1_icon2"
android:visibility="invisible"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_layer2"
tool:visibility="visible" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_icon3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_50"
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"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_layer3"
tool:visibility="visible" />
<androidx.appcompat.widget.AppCompatImageView
@ -86,11 +91,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_50"
android:layout_marginBottom="@dimen/dp_35"
android:src="@mipmap/ic_guide_item1_icon4"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="@id/iv_layer3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/iv_icon2"
app:layout_constraintStart_toEndOf="@id/iv_icon2"
tool:visibility="visible" />
<androidx.appcompat.widget.AppCompatImageView

View File

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tool="http://schemas.android.com/tools"
android:layout_width="match_parent"
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_item2_title"
android:visibility="invisible"
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_10"
android:src="@mipmap/ic_guide_item2_desc"
android:visibility="invisible"
app:layout_constraintStart_toStartOf="@id/iv_title"
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"
android:visibility="invisible"
app:layout_constraintBottom_toTopOf="@id/iv_icon2"
app:layout_constraintTop_toBottomOf="@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"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_area"
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_constraintTop_toBottomOf="@id/tv_title"
app:layout_constraintWidth_percent="0.33"
tool:listitem="@layout/listitem_guide_area" />
<TextView
android:id="@+id/tv_check_all"
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_46"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginEnd="@dimen/dp_16"
android:drawableStart="@mipmap/ic_check_true"
android:drawablePadding="@dimen/dp_6"
android:gravity="center"
android:text="全部"
android:textColor="@color/color_1a1a1a"
android:textSize="@dimen/sp_14"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_title" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_city"
android:layout_width="0dp"
android:layout_height="0dp"
android:paddingStart="@dimen/dp_16"
android:paddingEnd="@dimen/dp_16"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/rv_area"
app:layout_constraintTop_toBottomOf="@id/tv_check_all"
app:spanCount="2"
tool:listitem="@layout/listitem_guide_city" />
</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/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>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_46">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全国地区"
android:textColor="@color/color_222222"
android:textSize="@dimen/sp_14"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_cover"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintDimensionRatio="h,1:1"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@drawable/shape_80000000_cor6"
app:layout_constraintBottom_toBottomOf="@id/iv_cover"
app:layout_constraintEnd_toEndOf="@id/iv_cover"
app:layout_constraintStart_toStartOf="@id/iv_cover"
app:layout_constraintTop_toTopOf="@id/iv_cover" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@mipmap/ic_guide_item2_city_checked"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/tv_city_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="北京"
android:textColor="@color/white"
android:textSize="@dimen/sp_15" />
<TextView
android:id="@+id/tv_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_2"
android:text="5505亿元"
android:textColor="@color/white"
android:textSize="@dimen/sp_11" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_2"
android:text="(交易规模)"
android:textColor="@color/white"
android:textSize="9sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

View File

@ -90,5 +90,6 @@
<dimen name="dp_52">52dp</dimen>
<dimen name="dp_68">68dp</dimen>
<dimen name="dp_66">66dp</dimen>
<dimen name="dp_190">190dp</dimen>
</resources>