修改引导页2,添加引导页3
|
|
@ -9,6 +9,7 @@ class AreaEntity(
|
|||
val name: String = "",
|
||||
val amount: String = "",
|
||||
var children: MutableList<AreaEntity> = mutableListOf(),
|
||||
|
||||
var isChecked: Boolean = false
|
||||
) : Serializable {
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ class LauncherActivity : BaseActivity() {
|
|||
if (UserConfigManager.isFirstUseApp()) {
|
||||
UserConfigManager.saveFirstUseApp(false)
|
||||
if (UserConfigManager.getGuideEnable()) {
|
||||
// startActivity<GuideActivity>()
|
||||
LoginActivity.start(this@LauncherActivity)
|
||||
startActivity<GuideActivity>()
|
||||
} else {
|
||||
if (!LoginManager.isLogin()) {
|
||||
if (TextUtils.isEmpty(LoginManager.getLastLoginType())) {
|
||||
|
|
@ -117,8 +116,8 @@ class LauncherActivity : BaseActivity() {
|
|||
LoginActivity.start(this@LauncherActivity)
|
||||
}
|
||||
} else {
|
||||
startActivity<MainActivity>()
|
||||
// startActivity<GuideActivity>()
|
||||
// startActivity<MainActivity>()
|
||||
startActivity<GuideActivity>()
|
||||
}
|
||||
finish()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ 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.guide.item.GuideItem3Fragment
|
||||
import com.cheng.blzb.ui.fragment.mine.vip.VipFragment
|
||||
import com.example.base.common.RxBus
|
||||
import org.jetbrains.anko.startActivity
|
||||
|
|
@ -42,7 +43,7 @@ class GuideFragment :BaseFragment<FragmentGuideContentBinding, GuideViewModel>()
|
|||
private fun initFragment() {
|
||||
fragmentList.add(GuideItem1Fragment())
|
||||
fragmentList.add(GuideItem2Fragment())
|
||||
// fragmentList.add(GuideItem3Fragment())
|
||||
fragmentList.add(GuideItem3Fragment())
|
||||
// fragmentList.add(GuideItem4Fragment())
|
||||
// fragmentList.add(GuideItem5Fragment())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ 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) {
|
||||
class GuideItem2Area1Adapter: 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))
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.cheng.blzb.ui.fragment.guide.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.cheng.blzb.R
|
||||
import com.cheng.blzb.bean.AreaEntity
|
||||
import com.example.base.decoration.GridSpaceItemDecoration
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.utils.DensityUtils
|
||||
|
||||
class GuideItem2Area2Adapter(val area1Adapter: GuideItem2Area1Adapter): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_area2) {
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun convert(holder: BaseViewHolder, item: AreaEntity) {
|
||||
val tvName = holder.getView<TextView>(R.id.tv_name)
|
||||
val tvCheckAll = holder.getView<TextView>(R.id.tv_check_all)
|
||||
val rvCity = holder.getView<RecyclerView>(R.id.rv_city)
|
||||
|
||||
tvName.text = item.name
|
||||
|
||||
if (rvCity.adapter == null) {
|
||||
val adapter = GuideItem2CityAdapter()
|
||||
rvCity.adapter = adapter
|
||||
rvCity.addItemDecoration(GridSpaceItemDecoration(2, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
||||
}
|
||||
val cityAdapter = rvCity.adapter as GuideItem2CityAdapter
|
||||
cityAdapter.setList(item.children)
|
||||
|
||||
if (item.id == 0) {
|
||||
updateCheckState(tvCheckAll, data.all { area -> area.children.all { it.isChecked } })
|
||||
} else {
|
||||
updateCheckState(tvCheckAll, cityAdapter.data.all { it.isChecked })
|
||||
}
|
||||
|
||||
cityAdapter.setOnItemClickListener { _, _, position ->
|
||||
val cityItem = cityAdapter.getItem(position)
|
||||
cityItem.isChecked = !cityItem.isChecked
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
tvCheckAll.onClick {
|
||||
if (item.id == 0) {
|
||||
if (data.all { area -> area.children.all { it.isChecked } }) {
|
||||
data.forEach { area ->
|
||||
area.children.forEach { it.isChecked = false }
|
||||
}
|
||||
} else {
|
||||
data.forEach { area ->
|
||||
area.children.forEach { it.isChecked = true }
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (cityAdapter.data.all { it.isChecked }) {
|
||||
cityAdapter.data.forEach { it.isChecked = false }
|
||||
} else {
|
||||
cityAdapter.data.forEach { it.isChecked = true }
|
||||
}
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
tvName.onClick {
|
||||
data.find { it.isChecked }?.isChecked = false
|
||||
item.isChecked = true
|
||||
notifyDataSetChanged()
|
||||
area1Adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
holder.setGone(R.id.rv_city, !item.isChecked)
|
||||
}
|
||||
|
||||
private fun updateCheckState(textView: TextView, isCheckAll: Boolean) {
|
||||
if (isCheckAll) {
|
||||
textView.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_check_true, 0, 0, 0)
|
||||
} else {
|
||||
textView.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_check_false, 0, 0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,18 +2,17 @@ package com.cheng.blzb.ui.fragment.guide.item
|
|||
|
||||
import android.animation.AnimatorSet
|
||||
import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
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.cheng.blzb.ui.fragment.guide.adapter.GuideItem2Area1Adapter
|
||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem2Area2Adapter
|
||||
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
|
||||
|
|
@ -22,11 +21,9 @@ 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 area1Adapter by lazy { GuideItem2Area1Adapter() }
|
||||
|
||||
private val cityAdapter by lazy { GuideItem2CityAdapter() }
|
||||
|
||||
private var isCountrywide = true
|
||||
private val area2Adapter by lazy { GuideItem2Area2Adapter(area1Adapter) }
|
||||
|
||||
private var canClick = false
|
||||
|
||||
|
|
@ -34,19 +31,20 @@ class GuideItem2Fragment: BaseFragment<FragmentGuideItem2Binding, GuideViewModel
|
|||
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)))
|
||||
binding.rvArea1.adapter = area1Adapter
|
||||
binding.rvArea2.adapter = area2Adapter
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
binding.tvCityCount.text = "${UserConfigManager.getCityList().size}"
|
||||
val areaList = UserConfigManager.getAreaList()
|
||||
areaList.add(0, AreaEntity(0, name = "全国地区", isChecked = true))
|
||||
areaAdapter.setList(areaList)
|
||||
|
||||
mViewModel.getUserCity()
|
||||
areaList.add(0, AreaEntity(0, name = "全国地区"))
|
||||
areaList.forEach { area ->
|
||||
area.children.forEach { it.isChecked = true }
|
||||
}
|
||||
area1Adapter.setList(areaList)
|
||||
area2Adapter.setList(areaList)
|
||||
}
|
||||
|
||||
override fun onLazyLoad() {
|
||||
|
|
@ -54,96 +52,32 @@ class GuideItem2Fragment: BaseFragment<FragmentGuideItem2Binding, GuideViewModel
|
|||
startAnim()
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
areaAdapter.setOnItemClickListener { _, _, position ->
|
||||
val item = areaAdapter.getItem(position)
|
||||
areaAdapter.data.find { it.isChecked }?.isChecked = false
|
||||
area1Adapter.setOnItemClickListener { _, _, position ->
|
||||
val item = area1Adapter.getItem(position)
|
||||
area1Adapter.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
|
||||
}
|
||||
area1Adapter.notifyDataSetChanged()
|
||||
area2Adapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
if (canClick) {
|
||||
val selectList = mutableListOf<AreaEntity>()
|
||||
areaAdapter.data.forEach { area ->
|
||||
area1Adapter.data.forEach { area ->
|
||||
selectList.addAll(area.children.filter { it.isChecked })
|
||||
}
|
||||
if (!isCountrywide && selectList.isEmpty()) {
|
||||
if (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
|
||||
|
|
@ -179,6 +113,13 @@ class GuideItem2Fragment: BaseFragment<FragmentGuideItem2Binding, GuideViewModel
|
|||
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
|
||||
|
|
@ -189,15 +130,7 @@ class GuideItem2Fragment: BaseFragment<FragmentGuideItem2Binding, GuideViewModel
|
|||
})
|
||||
|
||||
val animSet = AnimatorSet()
|
||||
animSet.playTogether(titleTransAnim, descTransAnim, contentTransAnim, icon1TransAnim, icon2TransAnim, btnTransAnim)
|
||||
animSet.playTogether(titleTransAnim, descTransAnim, contentTransAnim, icon1TransAnim, icon2TransAnim, countTransAnim, 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
package com.cheng.blzb.ui.fragment.guide.item
|
||||
|
||||
import android.animation.AnimatorSet
|
||||
import android.animation.ObjectAnimator
|
||||
import android.animation.PropertyValuesHolder
|
||||
import android.view.animation.LinearInterpolator
|
||||
import androidx.core.animation.addListener
|
||||
import com.cheng.blzb.common.Constants
|
||||
import com.cheng.blzb.databinding.FragmentGuideItem3Binding
|
||||
import com.cheng.blzb.event.GuideEvent
|
||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
||||
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 com.example.base.utils.DensityUtils
|
||||
import com.example.base.utils.ScreenUtils
|
||||
|
||||
class GuideItem3Fragment : BaseFragment<FragmentGuideItem3Binding, GuideViewModel>() {
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
}
|
||||
|
||||
override fun onLazyLoad() {
|
||||
super.onLazyLoad()
|
||||
startAnim()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.ivBtn.onClick {
|
||||
if (canClick) {
|
||||
RxBus.defaultInstance.post(GuideEvent(true))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 = 1800
|
||||
option1ScaleAnim.interpolator = LinearInterpolator()
|
||||
option1ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption1.visible()
|
||||
})
|
||||
|
||||
val option2ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption2, scaleXHolder, scaleYHolder)
|
||||
option2ScaleAnim.duration = 1000
|
||||
option2ScaleAnim.startDelay = 1000
|
||||
option2ScaleAnim.interpolator = LinearInterpolator()
|
||||
option2ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption2.visible()
|
||||
})
|
||||
|
||||
val option3ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption3, scaleXHolder, scaleYHolder)
|
||||
option3ScaleAnim.duration = 1000
|
||||
option3ScaleAnim.startDelay = 1400
|
||||
option3ScaleAnim.interpolator = LinearInterpolator()
|
||||
option3ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption3.visible()
|
||||
})
|
||||
|
||||
val option4ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption4, scaleXHolder, scaleYHolder)
|
||||
option4ScaleAnim.duration = 1000
|
||||
option4ScaleAnim.startDelay = 1800
|
||||
option4ScaleAnim.interpolator = LinearInterpolator()
|
||||
option4ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption4.visible()
|
||||
})
|
||||
|
||||
val option5ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption5, scaleXHolder, scaleYHolder)
|
||||
option5ScaleAnim.duration = 1000
|
||||
option5ScaleAnim.startDelay = 1200
|
||||
option5ScaleAnim.interpolator = LinearInterpolator()
|
||||
option5ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption5.visible()
|
||||
})
|
||||
|
||||
val option6ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption6, scaleXHolder, scaleYHolder)
|
||||
option6ScaleAnim.duration = 1000
|
||||
option6ScaleAnim.startDelay = 1800
|
||||
option6ScaleAnim.interpolator = LinearInterpolator()
|
||||
option6ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption6.visible()
|
||||
})
|
||||
|
||||
val option7ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption7, scaleXHolder, scaleYHolder)
|
||||
option7ScaleAnim.duration = 1000
|
||||
option7ScaleAnim.startDelay = 1400
|
||||
option7ScaleAnim.interpolator = LinearInterpolator()
|
||||
option7ScaleAnim.addListener(onStart = {
|
||||
binding.layoutOption7.visible()
|
||||
})
|
||||
|
||||
val option8ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption8, scaleXHolder, scaleYHolder)
|
||||
option8ScaleAnim.duration = 1000
|
||||
option8ScaleAnim.startDelay = 1600
|
||||
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 = 200
|
||||
titleTransAnim.addListener(onStart = {
|
||||
binding.ivTitle.visible()
|
||||
})
|
||||
|
||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
||||
descTransAnim.duration = 1000
|
||||
descTransAnim.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 = {
|
||||
binding.ivBtn.visible()
|
||||
}, onEnd = {
|
||||
canClick = true
|
||||
})
|
||||
|
||||
val animSet = AnimatorSet()
|
||||
animSet.playTogether(
|
||||
option1ScaleAnim,
|
||||
option2ScaleAnim,
|
||||
option3ScaleAnim,
|
||||
option4ScaleAnim,
|
||||
option5ScaleAnim,
|
||||
option6ScaleAnim,
|
||||
option7ScaleAnim,
|
||||
option8ScaleAnim,
|
||||
bgTransAnim,
|
||||
titleTransAnim,
|
||||
descTransAnim,
|
||||
btnScaleAnim
|
||||
)
|
||||
animSet.start()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#E5EDFF"
|
||||
android:startColor="#6694FE" />
|
||||
</shape>
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_30"
|
||||
android:src="@mipmap/ic_guide_item_btn"
|
||||
android:src="@mipmap/ic_guide_item1_btn"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_area"
|
||||
android:id="@+id/rv_area1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
|
|
@ -79,38 +79,23 @@
|
|||
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_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" />
|
||||
tool:listitem="@layout/listitem_guide_area1" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_city"
|
||||
android:id="@+id/rv_area2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
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_area"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_check_all"
|
||||
app:spanCount="2"
|
||||
tool:listitem="@layout/listitem_guide_city" />
|
||||
app:layout_constraintStart_toEndOf="@id/rv_area1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||
tool:listitem="@layout/listitem_guide_area2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -126,6 +111,21 @@
|
|||
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"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,419 @@
|
|||
<?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="@drawable/shape_guide_item3_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: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_item3_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_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_option1"
|
||||
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/ic_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/ic_icon1"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_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_marginBottom="@dimen/dp_60"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option1"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_desc"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ic_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/ic_icon2"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_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_20"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option2"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ic_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/ic_icon3"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_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_marginStart="@dimen/dp_35"
|
||||
android:layout_marginTop="@dimen/dp_28"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option3"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ic_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/ic_icon4"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_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_44"
|
||||
android:layout_marginTop="-30dp"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintStart_toEndOf="@id/layout_option4"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_option4"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ic_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_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/ic_icon5"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_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_marginTop="@dimen/dp_32"
|
||||
android:layout_marginEnd="@dimen/dp_25"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/layout_option5"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ic_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_item3_checked"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/ic_icon6"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_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_16"
|
||||
android:layout_marginBottom="@dimen/dp_37"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option6"
|
||||
app:layout_constraintEnd_toEndOf="@id/layout_option6"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ic_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/ic_icon7"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_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_marginEnd="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_option1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tool:visibility="visible">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/ic_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/ic_icon8"
|
||||
app:layout_constraintTop_toTopOf="@id/ic_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/ic_icon8" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
<?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="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:gravity="center_vertical"
|
||||
android:text="全国地区"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_check_all"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_check_all"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
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_toTopOf="parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_city"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
app:spanCount="2"
|
||||
tool:itemCount="2"
|
||||
tool:listitem="@layout/listitem_guide_city" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 62 KiB |