修改引导页1234
|
|
@ -16,7 +16,10 @@ class ConfigEntity {
|
||||||
@SerializedName("client.guide.enable")
|
@SerializedName("client.guide.enable")
|
||||||
var guideEnable: Boolean? = true //是否开启引导页
|
var guideEnable: Boolean? = true //是否开启引导页
|
||||||
|
|
||||||
@SerializedName("client.nologin.pay.enable")
|
@SerializedName("client.bootpage.first") //引导页首页数据
|
||||||
|
var guideFirstData: List<String>? = emptyList()
|
||||||
|
|
||||||
|
@SerializedName("client.nologin.pay.enable") //是否可以未登录支付
|
||||||
var noLoginPayEnable: Boolean? = false
|
var noLoginPayEnable: Boolean? = false
|
||||||
|
|
||||||
@SerializedName("client.pay.agreement") //是否显示支付协议
|
@SerializedName("client.pay.agreement") //是否显示支付协议
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,5 @@ object Constants {
|
||||||
val dtjbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DingTalk-JinBuTi.ttf")
|
val dtjbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DingTalk-JinBuTi.ttf")
|
||||||
val ysbth = Typeface.createFromAsset(Utils.getApp().assets, "fonts/YouSheBiaoTiHei.ttf")
|
val ysbth = Typeface.createFromAsset(Utils.getApp().assets, "fonts/YouSheBiaoTiHei.ttf")
|
||||||
val albbphtB = Typeface.createFromAsset(Utils.getApp().assets, "fonts/AlibabaPuHuTi-Bold.otf")
|
val albbphtB = Typeface.createFromAsset(Utils.getApp().assets, "fonts/AlibabaPuHuTi-Bold.otf")
|
||||||
|
val digitalNumber = Typeface.createFromAsset(Utils.getApp().assets, "fonts/Sa-Digital-Number.ttf")
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.cheng.blzb.manager
|
package com.cheng.blzb.manager
|
||||||
|
|
||||||
|
import android.R
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
|
@ -105,6 +106,7 @@ object UserConfigManager {
|
||||||
if (data.config != null){
|
if (data.config != null){
|
||||||
saveGuidePayEnable(data.config!!.guidePayEnable!!)
|
saveGuidePayEnable(data.config!!.guidePayEnable!!)
|
||||||
saveGuideEnable(data.config!!.guideEnable!!)
|
saveGuideEnable(data.config!!.guideEnable!!)
|
||||||
|
saveGuideFirstData(data.config!!.guideFirstData!!)
|
||||||
saveNoLoginPay(data.config!!.noLoginPayEnable!!)
|
saveNoLoginPay(data.config!!.noLoginPayEnable!!)
|
||||||
savePayAgreementEnable(data.config!!.payAgreementEnable!!)
|
savePayAgreementEnable(data.config!!.payAgreementEnable!!)
|
||||||
saveLoginType(data.config!!.loginType!!)
|
saveLoginType(data.config!!.loginType!!)
|
||||||
|
|
@ -159,6 +161,21 @@ object UserConfigManager {
|
||||||
return MMKVUtils.getBoolean("guide", true)
|
return MMKVUtils.getBoolean("guide", true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 引导页首页数据
|
||||||
|
*/
|
||||||
|
private fun saveGuideFirstData(list: List<String>) {
|
||||||
|
MMKVUtils.put("guide_first", Gson().toJson(list))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getGuideFirstData(): List<String> {
|
||||||
|
val str = MMKVUtils.getString("guide_first")
|
||||||
|
if (!TextUtils.isEmpty(str)) {
|
||||||
|
return Gson().fromJson(str, object : TypeToken<List<String>>() {}.type)
|
||||||
|
}
|
||||||
|
return emptyList()
|
||||||
|
}
|
||||||
|
|
||||||
fun saveIsTemp(temp: Boolean) {
|
fun saveIsTemp(temp: Boolean) {
|
||||||
MMKVUtils.put("x-role", temp)//true临时用户 ,false登录用户
|
MMKVUtils.put("x-role", temp)//true临时用户 ,false登录用户
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ class GuideFragment : BaseFragment<FragmentGuideContentBinding, GuideViewModel>(
|
||||||
companion object {
|
companion object {
|
||||||
val cityList = mutableListOf<AreaEntity>()
|
val cityList = mutableListOf<AreaEntity>()
|
||||||
val hotWordList = mutableListOf<HotWordEntity.Child>()
|
val hotWordList = mutableListOf<HotWordEntity.Child>()
|
||||||
|
val keywordList = mutableListOf<HotWordEntity.Child>()
|
||||||
var totalInfo: GuideTotalBidEntity? = null
|
var totalInfo: GuideTotalBidEntity? = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.cheng.blzb.ui.fragment.guide.adapter
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.blzb.R
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
|
||||||
|
class GuideItem1Adapter(val context: Context): RecyclerView.Adapter<BaseViewHolder>() {
|
||||||
|
val data: MutableList<String> = mutableListOf()
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||||
|
val view = View.inflate(context, R.layout.listitem_guide_item1_company, null)
|
||||||
|
val lp = ConstraintLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, DensityUtils.dp2px(28f))
|
||||||
|
lp.leftMargin = DensityUtils.dp2px(20f)
|
||||||
|
view.layoutParams = lp
|
||||||
|
return BaseViewHolder(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("DiscouragedApi")
|
||||||
|
override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
|
||||||
|
holder.setText(R.id.tv_name, data[position % data.size])
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return if (data.isNotEmpty()) Int.MAX_VALUE else 0
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
fun setList(list: List<String>) {
|
||||||
|
data.clear()
|
||||||
|
data.addAll(list)
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.cheng.blzb.ui.fragment.guide.adapter
|
||||||
|
|
||||||
|
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.HotWordEntity
|
||||||
|
import com.cheng.blzb.common.Constants
|
||||||
|
|
||||||
|
class GuideItem2Adapter: BaseQuickAdapter<HotWordEntity, BaseViewHolder>(R.layout.listitem_guide_item2) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: HotWordEntity) {
|
||||||
|
holder.getView<TextView>(R.id.tv_name).typeface = Constants.almmsht
|
||||||
|
holder.setText(R.id.tv_name, item.name)
|
||||||
|
holder.setImageResource(R.id.iv_bg,if (item.isChecked) R.mipmap.ic_guide_item2_checked else R.mipmap.ic_guide_item2_default)
|
||||||
|
when(item.name) {
|
||||||
|
"工程建设" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon1)
|
||||||
|
}
|
||||||
|
|
||||||
|
"工业制造" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon2)
|
||||||
|
}
|
||||||
|
|
||||||
|
"信息传输" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon3)
|
||||||
|
}
|
||||||
|
|
||||||
|
"商业环卫" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon4)
|
||||||
|
}
|
||||||
|
|
||||||
|
"科学教育" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon5)
|
||||||
|
}
|
||||||
|
|
||||||
|
"交通运输" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon6)
|
||||||
|
}
|
||||||
|
|
||||||
|
"能源产业" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon7)
|
||||||
|
}
|
||||||
|
|
||||||
|
"其他" -> {
|
||||||
|
holder.setImageResource(R.id.iv_icon, R.mipmap.ic_guide_item2_icon8)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,20 +1,100 @@
|
||||||
package com.cheng.blzb.ui.fragment.guide.adapter
|
package com.cheng.blzb.ui.fragment.guide.adapter
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.view.animation.RotateAnimation
|
||||||
|
import android.widget.ImageView
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
import com.cheng.blzb.R
|
import com.cheng.blzb.R
|
||||||
import com.cheng.blzb.bean.HotWordEntity
|
import com.cheng.blzb.bean.HotWordEntity
|
||||||
import com.example.base.extensions.getColor
|
import com.cheng.blzb.common.Constants
|
||||||
|
import com.example.base.decoration.GridSpaceItemDecoration
|
||||||
|
import com.example.base.extensions.onClick
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
import com.example.base.utils.SpanUtils
|
||||||
|
import kotlin.math.ceil
|
||||||
|
|
||||||
class GuideItem3Adapter : BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide_item3) {
|
class GuideItem3Adapter(val context: Context): RecyclerView.Adapter<BaseViewHolder>() {
|
||||||
override fun convert(holder: BaseViewHolder, item: HotWordEntity.Child) {
|
val data: MutableList<HotWordEntity.Child> = mutableListOf()
|
||||||
|
|
||||||
|
private var mOnKeywordClickListener: ((keyword: HotWordEntity.Child) -> Unit)? = null
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||||
|
val view = View.inflate(context, R.layout.listitem_guide_item3, null)
|
||||||
|
val lp = ConstraintLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||||
|
view.layoutParams = lp
|
||||||
|
return BaseViewHolder(view)
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("DiscouragedApi")
|
||||||
|
override fun onBindViewHolder(holder: BaseViewHolder, position: Int) {
|
||||||
|
val item = data[position % data.size]
|
||||||
holder.setText(R.id.tv_name, item.name)
|
holder.setText(R.id.tv_name, item.name)
|
||||||
if (item.isChecked) {
|
SpanUtils.with(holder.getView(R.id.tv_amount))
|
||||||
holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item3_checked)
|
.append(item.amount)
|
||||||
holder.setTextColor(R.id.tv_name, getColor(R.color.color_125ffe))
|
.setTypeface(Constants.digitalNumber)
|
||||||
} else {
|
.appendSpace(DensityUtils.dp2px(2f))
|
||||||
holder.setImageResource(R.id.iv_add, R.mipmap.ic_guide_item3_default)
|
.append("亿")
|
||||||
holder.setTextColor(R.id.tv_name, getColor(R.color.color_1a1a1a))
|
.setForegroundColor(Color.WHITE)
|
||||||
|
.create()
|
||||||
|
|
||||||
|
val rvKeywords = holder.getView<RecyclerView>(R.id.mRecyclerView)
|
||||||
|
if (rvKeywords.adapter == null) {
|
||||||
|
rvKeywords.adapter = GuideItem3KeywordAdapter()
|
||||||
|
rvKeywords.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(12f), DensityUtils.dp2px(12f)))
|
||||||
|
}
|
||||||
|
val keywordAdapter = rvKeywords.adapter as GuideItem3KeywordAdapter
|
||||||
|
keywordAdapter.setOnItemClickListener { _, _, position ->
|
||||||
|
val keywordItem = keywordAdapter.getItem(position)
|
||||||
|
mOnKeywordClickListener?.invoke(keywordItem)
|
||||||
|
}
|
||||||
|
val keywordList = mutableListOf<HotWordEntity.Child>()
|
||||||
|
for (i in 0 until 15) {
|
||||||
|
keywordList.add(item.children[i])
|
||||||
|
}
|
||||||
|
keywordAdapter.setList(keywordList)
|
||||||
|
|
||||||
|
holder.getView<ImageView>(R.id.iv_refresh).onClick { view ->
|
||||||
|
startRotate(view)
|
||||||
|
if (ceil(item.children.size / 15.0) > keywordAdapter.page + 1) {
|
||||||
|
keywordAdapter.page++
|
||||||
|
} else {
|
||||||
|
keywordAdapter.page = 0
|
||||||
|
}
|
||||||
|
val keywordList = mutableListOf<HotWordEntity.Child>()
|
||||||
|
for (i in keywordAdapter.page * 15 until ((keywordAdapter.page + 1) * 15).coerceAtMost(item.children.size)) {
|
||||||
|
keywordList.add(item.children[i])
|
||||||
|
}
|
||||||
|
keywordAdapter.setList(keywordList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun getItemCount(): Int {
|
||||||
|
return if (data.isNotEmpty()) Int.MAX_VALUE else 0
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startRotate(view: View) {
|
||||||
|
if (view.animation != null) {
|
||||||
|
view.animation.cancel()
|
||||||
|
}
|
||||||
|
val anim = RotateAnimation(0f, 360f, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f)
|
||||||
|
anim.duration = 1000
|
||||||
|
view.startAnimation(anim)
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
fun setList(list: List<HotWordEntity.Child>) {
|
||||||
|
data.clear()
|
||||||
|
data.addAll(list)
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setOnKeywordClickListener(listener: (keyword: HotWordEntity.Child) -> Unit) {
|
||||||
|
this.mOnKeywordClickListener = listener
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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.HotWordEntity
|
||||||
|
|
||||||
|
class GuideItem3KeywordAdapter : BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide_item3_keyword) {
|
||||||
|
var page = 0
|
||||||
|
|
||||||
|
override fun convert(holder: BaseViewHolder, item: HotWordEntity.Child) {
|
||||||
|
holder.setText(R.id.tv_name, item.name)
|
||||||
|
holder.itemView.setBackgroundResource(if (item.isChecked) R.mipmap.ic_guide_item3_checked else R.mipmap.ic_guide_item3_default)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
package com.cheng.blzb.ui.fragment.guide.adapter
|
package com.cheng.blzb.ui.fragment.guide.adapter
|
||||||
|
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.core.graphics.toColorInt
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
import com.cheng.blzb.R
|
import com.cheng.blzb.R
|
||||||
import com.cheng.blzb.bean.HotWordEntity
|
import com.cheng.blzb.bean.HotWordEntity
|
||||||
import com.example.base.extensions.getColor
|
|
||||||
|
|
||||||
class GuideItem3SelectedAdapter: BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide3_selected_keyword) {
|
class GuideItem3SelectedAdapter: BaseQuickAdapter<HotWordEntity.Child, BaseViewHolder>(R.layout.listitem_guide_item3_selected_keyword) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
addChildClickViewIds(R.id.iv_delete)
|
addChildClickViewIds(R.id.iv_delete)
|
||||||
|
|
@ -16,13 +14,6 @@ class GuideItem3SelectedAdapter: BaseQuickAdapter<HotWordEntity.Child, BaseViewH
|
||||||
|
|
||||||
override fun convert(holder: BaseViewHolder, item: HotWordEntity.Child) {
|
override fun convert(holder: BaseViewHolder, item: HotWordEntity.Child) {
|
||||||
holder.setText(R.id.tv_name, item.name)
|
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_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)
|
|
||||||
}
|
|
||||||
holder.getView<TextView>(R.id.tv_name).requestFocus()
|
holder.getView<TextView>(R.id.tv_name).requestFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.cheng.blzb.ui.fragment.guide.adapter
|
package com.cheng.blzb.ui.fragment.guide.adapter
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
import android.widget.ImageView
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
|
@ -11,13 +12,12 @@ import com.example.base.decoration.GridSpaceItemDecoration
|
||||||
import com.example.base.extensions.onClick
|
import com.example.base.extensions.onClick
|
||||||
import com.example.base.utils.DensityUtils
|
import com.example.base.utils.DensityUtils
|
||||||
|
|
||||||
class GuideItem4Area2Adapter(): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_area2) {
|
class GuideItem4Adapter(): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layout.listitem_guide_item4) {
|
||||||
private var mListener: (() -> Unit)? = null
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun convert(holder: BaseViewHolder, item: AreaEntity) {
|
override fun convert(holder: BaseViewHolder, item: AreaEntity) {
|
||||||
val tvName = holder.getView<TextView>(R.id.tv_name)
|
val tvName = holder.getView<TextView>(R.id.tv_name)
|
||||||
val tvCheckAll = holder.getView<TextView>(R.id.tv_check_all)
|
val ivCheckAll = holder.getView<ImageView>(R.id.iv_check_all)
|
||||||
val rvCity = holder.getView<RecyclerView>(R.id.rv_city)
|
val rvCity = holder.getView<RecyclerView>(R.id.rv_city)
|
||||||
|
|
||||||
tvName.text = item.name
|
tvName.text = item.name
|
||||||
|
|
@ -25,25 +25,24 @@ class GuideItem4Area2Adapter(): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.l
|
||||||
if (rvCity.adapter == null) {
|
if (rvCity.adapter == null) {
|
||||||
val adapter = GuideItem4CityAdapter()
|
val adapter = GuideItem4CityAdapter()
|
||||||
rvCity.adapter = adapter
|
rvCity.adapter = adapter
|
||||||
rvCity.addItemDecoration(GridSpaceItemDecoration(2, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
rvCity.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(14f), DensityUtils.dp2px(14f)))
|
||||||
}
|
}
|
||||||
val cityAdapter = rvCity.adapter as GuideItem4CityAdapter
|
val cityAdapter = rvCity.adapter as GuideItem4CityAdapter
|
||||||
cityAdapter.setList(item.children)
|
cityAdapter.setList(item.children)
|
||||||
|
|
||||||
if (item.id == 0) {
|
if (item.id == 0) {
|
||||||
updateCheckState(tvCheckAll, data.all { area -> area.children.all { it.isChecked } })
|
updateCheckState(ivCheckAll, data.all { area -> area.children.all { it.isChecked } })
|
||||||
} else {
|
} else {
|
||||||
updateCheckState(tvCheckAll, cityAdapter.data.all { it.isChecked })
|
updateCheckState(ivCheckAll, cityAdapter.data.all { it.isChecked })
|
||||||
}
|
}
|
||||||
|
|
||||||
cityAdapter.setOnItemClickListener { _, _, position ->
|
cityAdapter.setOnItemClickListener { _, _, position ->
|
||||||
val cityItem = cityAdapter.getItem(position)
|
val cityItem = cityAdapter.getItem(position)
|
||||||
cityItem.isChecked = !cityItem.isChecked
|
cityItem.isChecked = !cityItem.isChecked
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
mListener?.invoke()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tvCheckAll.onClick {
|
ivCheckAll.onClick {
|
||||||
if (item.id == 0) {
|
if (item.id == 0) {
|
||||||
if (data.all { area -> area.children.all { it.isChecked } }) {
|
if (data.all { area -> area.children.all { it.isChecked } }) {
|
||||||
data.forEach { area ->
|
data.forEach { area ->
|
||||||
|
|
@ -62,19 +61,14 @@ class GuideItem4Area2Adapter(): BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.l
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
mListener?.invoke()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateCheckState(textView: TextView, isCheckAll: Boolean) {
|
private fun updateCheckState(imageView: ImageView, isCheckAll: Boolean) {
|
||||||
if (isCheckAll) {
|
if (isCheckAll) {
|
||||||
textView.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_check_true, 0, 0, 0)
|
imageView.setImageResource(R.mipmap.ic_check_true)
|
||||||
} else {
|
} else {
|
||||||
textView.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_check_false, 0, 0, 0)
|
imageView.setImageResource(R.mipmap.ic_check_false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setOnCityClickListener(listener: () -> Unit) {
|
|
||||||
this.mListener = listener
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
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 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))
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -10,6 +10,6 @@ class GuideItem4CityAdapter: BaseQuickAdapter<AreaEntity, BaseViewHolder>(R.layo
|
||||||
holder.setImageResource(R.id.iv_cover, item.getCityImage())
|
holder.setImageResource(R.id.iv_cover, item.getCityImage())
|
||||||
holder.setText(R.id.tv_city_name, item.name)
|
holder.setText(R.id.tv_city_name, item.name)
|
||||||
holder.setText(R.id.tv_amount, "${item.amount}亿元")
|
holder.setText(R.id.tv_amount, "${item.amount}亿元")
|
||||||
holder.setVisible(R.id.iv_check, item.isChecked)
|
holder.setImageResource(R.id.iv_bg, if (item.isChecked) R.mipmap.ic_guide_item4_checked else R.mipmap.ic_guide_item4_default)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,27 +9,40 @@ import androidx.core.animation.addListener
|
||||||
import com.cheng.blzb.common.Constants
|
import com.cheng.blzb.common.Constants
|
||||||
import com.cheng.blzb.databinding.FragmentGuideItem1Binding
|
import com.cheng.blzb.databinding.FragmentGuideItem1Binding
|
||||||
import com.cheng.blzb.event.GuideEvent
|
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.GuideViewModel
|
||||||
|
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem1Adapter
|
||||||
import com.example.base.common.RxBus
|
import com.example.base.common.RxBus
|
||||||
|
import com.example.base.decoration.FirstItemOffsetDecoration
|
||||||
import com.example.base.extensions.onClick
|
import com.example.base.extensions.onClick
|
||||||
import com.example.base.extensions.visible
|
import com.example.base.extensions.visible
|
||||||
import com.example.base.ui.BaseFragment
|
import com.example.base.ui.BaseFragment
|
||||||
import com.example.base.utils.DensityUtils
|
import com.example.base.utils.DensityUtils
|
||||||
import com.example.base.utils.ScreenUtils
|
import com.example.base.utils.ScreenUtils
|
||||||
|
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
|
import io.reactivex.rxjava3.core.Observable
|
||||||
|
import io.reactivex.rxjava3.disposables.Disposable
|
||||||
|
import org.jetbrains.anko.sdk27.listeners.onTouch
|
||||||
import org.libpag.PAGFile
|
import org.libpag.PAGFile
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewModel>() {
|
class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewModel>() {
|
||||||
|
private val companyAdapter by lazy { GuideItem1Adapter(requireContext()) }
|
||||||
|
private var scrollTask: Disposable? = null
|
||||||
private var canClick = false
|
private var canClick = false
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
super.initView()
|
super.initView()
|
||||||
binding.tvTitle.typeface = Constants.albbphtB
|
binding.tvTitle.typeface = Constants.albbphtB
|
||||||
binding.tvAppName.typeface = Constants.pmzdbt
|
binding.tvAppName.typeface = Constants.pmzdbt
|
||||||
binding.tvBtn.typeface = Constants.almmsht
|
binding.tvNext.typeface = Constants.almmsht
|
||||||
|
|
||||||
val pagFile = PAGFile.Load(requireContext().assets, "effects/guide_earth.pag")
|
val pagFile = PAGFile.Load(requireContext().assets, "effects/guide_earth.pag")
|
||||||
binding.pagView.composition = pagFile
|
binding.pagView.composition = pagFile
|
||||||
binding.pagView.setRepeatCount(0)
|
binding.pagView.setRepeatCount(0)
|
||||||
|
|
||||||
|
binding.rvCompany.adapter = companyAdapter
|
||||||
|
binding.rvCompany.addItemDecoration(FirstItemOffsetDecoration(ScreenUtils.getScreenWidth()))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLazyLoad() {
|
override fun onLazyLoad() {
|
||||||
|
|
@ -44,7 +57,9 @@ class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewMode
|
||||||
|
|
||||||
override fun initListener() {
|
override fun initListener() {
|
||||||
super.initListener()
|
super.initListener()
|
||||||
binding.layoutBtn.onClick {
|
binding.rvCompany.onTouch { _, _ -> true }
|
||||||
|
|
||||||
|
binding.layoutNext.onClick {
|
||||||
if (canClick) {
|
if (canClick) {
|
||||||
RxBus.defaultInstance.post(GuideEvent(1))
|
RxBus.defaultInstance.post(GuideEvent(1))
|
||||||
}
|
}
|
||||||
|
|
@ -68,10 +83,13 @@ class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewMode
|
||||||
})
|
})
|
||||||
|
|
||||||
val flowTransAnim = ObjectAnimator.ofFloat(binding.ivFlow, "translationY", -ScreenUtils.getScreenHeight().toFloat(), 0f)
|
val flowTransAnim = ObjectAnimator.ofFloat(binding.ivFlow, "translationY", -ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
flowTransAnim.duration = 1000
|
flowTransAnim.duration = 2000
|
||||||
flowTransAnim.startDelay = 2000
|
flowTransAnim.startDelay = 2000
|
||||||
flowTransAnim.addListener(onStart = {
|
flowTransAnim.addListener(onStart = {
|
||||||
binding.ivFlow.visible()
|
binding.ivFlow.visible()
|
||||||
|
}, onEnd = {
|
||||||
|
companyAdapter.setList(UserConfigManager.getGuideFirstData())
|
||||||
|
startScroll()
|
||||||
})
|
})
|
||||||
|
|
||||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.layoutTitle, "translationY", -DensityUtils.dp2px(300f).toFloat(), 0f)
|
val titleTransAnim = ObjectAnimator.ofFloat(binding.layoutTitle, "translationY", -DensityUtils.dp2px(300f).toFloat(), 0f)
|
||||||
|
|
@ -89,6 +107,13 @@ class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewMode
|
||||||
binding.ivLight.visible()
|
binding.ivLight.visible()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
val companyTransAnim = ObjectAnimator.ofFloat(binding.rvCompany, "alpha", 0f, 1f)
|
||||||
|
companyTransAnim.duration = 1000
|
||||||
|
companyTransAnim.startDelay = 800
|
||||||
|
companyTransAnim.addListener(onStart = {
|
||||||
|
binding.rvCompany.visible()
|
||||||
|
})
|
||||||
|
|
||||||
val earthScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.pagView, scaleXHolder2, scaleYHolder2)
|
val earthScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.pagView, scaleXHolder2, scaleYHolder2)
|
||||||
earthScaleAnim.duration = 1000
|
earthScaleAnim.duration = 1000
|
||||||
earthScaleAnim.startDelay = 1000
|
earthScaleAnim.startDelay = 1000
|
||||||
|
|
@ -96,12 +121,12 @@ class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewMode
|
||||||
binding.pagView.visible()
|
binding.pagView.visible()
|
||||||
})
|
})
|
||||||
|
|
||||||
val btnScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutBtn, scaleXHolder1, scaleYHolder1)
|
val btnScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutNext, scaleXHolder1, scaleYHolder1)
|
||||||
btnScaleAnim.duration = 1000
|
btnScaleAnim.duration = 1000
|
||||||
btnScaleAnim.startDelay = 1800
|
btnScaleAnim.startDelay = 3000
|
||||||
btnScaleAnim.interpolator = LinearInterpolator()
|
btnScaleAnim.interpolator = LinearInterpolator()
|
||||||
btnScaleAnim.addListener(onStart = {
|
btnScaleAnim.addListener(onStart = {
|
||||||
binding.layoutBtn.visible()
|
binding.layoutNext.visible()
|
||||||
}, onEnd = {
|
}, onEnd = {
|
||||||
canClick = true
|
canClick = true
|
||||||
})
|
})
|
||||||
|
|
@ -112,9 +137,36 @@ class GuideItem1Fragment : BaseFragment<FragmentGuideItem1Binding, GuideViewMode
|
||||||
flowTransAnim,
|
flowTransAnim,
|
||||||
titleTransAnim,
|
titleTransAnim,
|
||||||
lightTransAnim,
|
lightTransAnim,
|
||||||
|
companyTransAnim,
|
||||||
earthScaleAnim,
|
earthScaleAnim,
|
||||||
btnScaleAnim
|
btnScaleAnim
|
||||||
)
|
)
|
||||||
animSet.start()
|
animSet.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun startScroll() {
|
||||||
|
if (companyAdapter.data.isEmpty() || scrollTask != null) return
|
||||||
|
scrollTask = Observable.interval(300, 9, TimeUnit.MILLISECONDS)
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe {
|
||||||
|
if (activity != null) {
|
||||||
|
binding.rvCompany.scrollBy(3, 0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun stopScroll() {
|
||||||
|
scrollTask?.dispose()
|
||||||
|
scrollTask = null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStart() {
|
||||||
|
startScroll()
|
||||||
|
super.onStart()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
stopScroll()
|
||||||
|
super.onStop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
package com.cheng.blzb.ui.fragment.guide.item
|
package com.cheng.blzb.ui.fragment.guide.item
|
||||||
|
|
||||||
import android.animation.AnimatorSet
|
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
import android.animation.PropertyValuesHolder
|
import android.annotation.SuppressLint
|
||||||
import android.view.animation.LinearInterpolator
|
|
||||||
import androidx.core.animation.addListener
|
import androidx.core.animation.addListener
|
||||||
import com.cheng.blzb.R
|
import com.cheng.blzb.bean.HotWordEntity
|
||||||
import com.cheng.blzb.common.Constants
|
import com.cheng.blzb.common.Constants
|
||||||
import com.cheng.blzb.databinding.FragmentGuideItem2Binding
|
import com.cheng.blzb.databinding.FragmentGuideItem2Binding
|
||||||
import com.cheng.blzb.event.GuideEvent
|
import com.cheng.blzb.event.GuideEvent
|
||||||
import com.cheng.blzb.manager.UserConfigManager
|
import com.cheng.blzb.manager.UserConfigManager
|
||||||
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
||||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
||||||
|
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem2Adapter
|
||||||
import com.example.base.common.RxBus
|
import com.example.base.common.RxBus
|
||||||
import com.example.base.extensions.gone
|
import com.example.base.decoration.GridSpaceItemDecoration
|
||||||
import com.example.base.extensions.onClick
|
import com.example.base.extensions.onClick
|
||||||
import com.example.base.extensions.toast
|
import com.example.base.extensions.toast
|
||||||
import com.example.base.extensions.visible
|
import com.example.base.extensions.visible
|
||||||
|
|
@ -22,20 +21,17 @@ import com.example.base.utils.DensityUtils
|
||||||
import com.example.base.utils.ScreenUtils
|
import com.example.base.utils.ScreenUtils
|
||||||
|
|
||||||
class GuideItem2Fragment : BaseFragment<FragmentGuideItem2Binding, GuideViewModel>() {
|
class GuideItem2Fragment : BaseFragment<FragmentGuideItem2Binding, GuideViewModel>() {
|
||||||
private val ids = mutableListOf<Int>()
|
private val mAdapter by lazy { GuideItem2Adapter() }
|
||||||
|
|
||||||
private var canClick = false
|
private var canClick = false
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
super.initView()
|
super.initView()
|
||||||
binding.tvName1.typeface = Constants.douyinsansB
|
binding.tvTitle.typeface = Constants.pmzdbt
|
||||||
binding.tvName2.typeface = Constants.douyinsansB
|
binding.tvNext.typeface = Constants.almmsht
|
||||||
binding.tvName3.typeface = Constants.douyinsansB
|
|
||||||
binding.tvName4.typeface = Constants.douyinsansB
|
binding.mRecyclerView.adapter = mAdapter
|
||||||
binding.tvName5.typeface = Constants.douyinsansB
|
binding.mRecyclerView.addItemDecoration(GridSpaceItemDecoration(2, DensityUtils.dp2px(18f), DensityUtils.dp2px(13f)))
|
||||||
binding.tvName6.typeface = Constants.douyinsansB
|
|
||||||
binding.tvName7.typeface = Constants.douyinsansB
|
|
||||||
binding.tvName8.typeface = Constants.douyinsansB
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLazyLoad() {
|
override fun onLazyLoad() {
|
||||||
|
|
@ -45,115 +41,30 @@ class GuideItem2Fragment : BaseFragment<FragmentGuideItem2Binding, GuideViewMode
|
||||||
} else {
|
} else {
|
||||||
mViewModel.getHotWordList()
|
mViewModel.getHotWordList()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun initListener() {
|
override fun initListener() {
|
||||||
super.initListener()
|
super.initListener()
|
||||||
binding.layoutOption1.onClick {
|
mAdapter.setOnItemClickListener { _, _, position ->
|
||||||
val id = binding.layoutOption1.tag as Int
|
val item = mAdapter.getItem(position)
|
||||||
if (ids.contains(id)) {
|
item.isChecked = !item.isChecked
|
||||||
ids.remove(id)
|
mAdapter.notifyDataSetChanged()
|
||||||
binding.ivCheck1.gone()
|
|
||||||
} else {
|
|
||||||
ids.add(id)
|
|
||||||
binding.ivCheck1.visible()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.layoutOption2.onClick {
|
binding.layoutNext.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.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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.ivBtn.onClick {
|
|
||||||
if (canClick) {
|
if (canClick) {
|
||||||
if (ids.isEmpty()) {
|
val list = mAdapter.data.filter { it.isChecked }
|
||||||
|
if (list.isEmpty()) {
|
||||||
toast("请选择行业")
|
toast("请选择行业")
|
||||||
return@onClick
|
return@onClick
|
||||||
}
|
}
|
||||||
val hasOther = ids.contains(0)
|
val hasOther = list.find { it.id == 0 } != null
|
||||||
val selectedList = if (hasOther) {
|
val selectedList = if (hasOther) mAdapter.data else list
|
||||||
UserConfigManager.getGuideKeywords()
|
|
||||||
} else {
|
|
||||||
UserConfigManager.getGuideKeywords().filter { ids.contains(it.id) }
|
|
||||||
}
|
|
||||||
selectedList.forEach {
|
selectedList.forEach {
|
||||||
GuideFragment.hotWordList.addAll(it.children)
|
GuideFragment.hotWordList.addAll(it.children)
|
||||||
}
|
}
|
||||||
RxBus.defaultInstance.post(GuideEvent(3))
|
RxBus.defaultInstance.post(GuideEvent(2))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -167,162 +78,20 @@ class GuideItem2Fragment : BaseFragment<FragmentGuideItem2Binding, GuideViewMode
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setData() {
|
private fun setData() {
|
||||||
val hotWords = UserConfigManager.getGuideKeywords()
|
mAdapter.setList(UserConfigManager.getGuideKeywords())
|
||||||
hotWords.forEachIndexed { index, item ->
|
mAdapter.addData(HotWordEntity(0, "其他"))
|
||||||
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()
|
startAnim()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun startAnim() {
|
private fun startAnim() {
|
||||||
val scaleXHolder = PropertyValuesHolder.ofFloat("scaleX", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
val contentTransAnim = ObjectAnimator.ofFloat(binding.layoutContent, "translationX", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
||||||
val scaleYHolder = PropertyValuesHolder.ofFloat("scaleY", 0.85f, 1.15f, 0.9f, 1.1f, 0.95f, 1f)
|
contentTransAnim.duration = 1000
|
||||||
|
contentTransAnim.startDelay = 400
|
||||||
val option1ScaleAnim = ObjectAnimator.ofPropertyValuesHolder(binding.layoutOption1, scaleXHolder, scaleYHolder)
|
contentTransAnim.addListener(onStart = {
|
||||||
option1ScaleAnim.duration = 1000
|
binding.layoutContent.visible()
|
||||||
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 = 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 = {
|
}, onEnd = {
|
||||||
canClick = true
|
canClick = true
|
||||||
})
|
})
|
||||||
|
contentTransAnim.start()
|
||||||
val animSet = AnimatorSet()
|
|
||||||
animSet.playTogether(
|
|
||||||
option1ScaleAnim,
|
|
||||||
option2ScaleAnim,
|
|
||||||
option3ScaleAnim,
|
|
||||||
option4ScaleAnim,
|
|
||||||
option5ScaleAnim,
|
|
||||||
option6ScaleAnim,
|
|
||||||
option7ScaleAnim,
|
|
||||||
option8ScaleAnim,
|
|
||||||
bgTransAnim,
|
|
||||||
titleTransAnim,
|
|
||||||
descTransAnim,
|
|
||||||
btnScaleAnim
|
|
||||||
)
|
|
||||||
animSet.start()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,232 +2,144 @@ package com.cheng.blzb.ui.fragment.guide.item
|
||||||
|
|
||||||
import android.animation.AnimatorSet
|
import android.animation.AnimatorSet
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
import android.view.Gravity
|
import android.text.TextUtils
|
||||||
import android.view.animation.LinearInterpolator
|
|
||||||
import android.view.animation.RotateAnimation
|
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.core.animation.addListener
|
import androidx.core.animation.addListener
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.cheng.blzb.R
|
import com.cheng.blzb.R
|
||||||
import com.cheng.blzb.bean.HotWordEntity
|
import com.cheng.blzb.bean.HotWordEntity
|
||||||
|
import com.cheng.blzb.common.Constants
|
||||||
import com.cheng.blzb.databinding.FragmentGuideItem3Binding
|
import com.cheng.blzb.databinding.FragmentGuideItem3Binding
|
||||||
import com.cheng.blzb.event.GuideEvent
|
import com.cheng.blzb.event.GuideEvent
|
||||||
import com.cheng.blzb.ui.dialog.AddKeywordDialog
|
|
||||||
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
||||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
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.GuideItem3Adapter
|
||||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem3SelectedAdapter
|
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem3SelectedAdapter
|
||||||
|
import com.cheng.blzb.widget.ZoomOutPageTransformer
|
||||||
import com.example.base.common.RxBus
|
import com.example.base.common.RxBus
|
||||||
import com.example.base.decoration.GridSpaceItemDecoration
|
import com.example.base.decoration.GridSpaceItemDecoration
|
||||||
import com.example.base.extensions.getColor
|
import com.example.base.extensions.gone
|
||||||
import com.example.base.extensions.onClick
|
import com.example.base.extensions.onClick
|
||||||
import com.example.base.extensions.toast
|
import com.example.base.extensions.toast
|
||||||
import com.example.base.extensions.visible
|
import com.example.base.extensions.visible
|
||||||
import com.example.base.ui.BaseFragment
|
import com.example.base.ui.BaseFragment
|
||||||
import com.example.base.utils.DensityUtils
|
import com.example.base.utils.DensityUtils
|
||||||
import com.example.base.utils.ScreenUtils
|
import com.example.base.utils.ScreenUtils
|
||||||
import com.example.base.utils.SpanUtils
|
|
||||||
import kotlin.math.ceil
|
|
||||||
|
|
||||||
class GuideItem3Fragment : BaseFragment<FragmentGuideItem3Binding, GuideViewModel>() {
|
class GuideItem3Fragment : BaseFragment<FragmentGuideItem3Binding, GuideViewModel>() {
|
||||||
private val mAdapter by lazy { GuideItem3Adapter() }
|
private val mAdapter by lazy { GuideItem3Adapter(requireContext()) }
|
||||||
|
|
||||||
private val selectedAdapter by lazy { GuideItem3SelectedAdapter() }
|
private val selectedAdapter by lazy { GuideItem3SelectedAdapter() }
|
||||||
|
|
||||||
private val hotWordChildList = mutableListOf<HotWordEntity.Child>()
|
|
||||||
|
|
||||||
private var tabIndex = 0
|
|
||||||
|
|
||||||
private var page = 0
|
|
||||||
|
|
||||||
private var canClick = false
|
private var canClick = false
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
super.initView()
|
super.initView()
|
||||||
binding.mRecyclerView.adapter = mAdapter
|
binding.tvTitle.typeface = Constants.pmzdbt
|
||||||
binding.mRecyclerView.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
binding.tvNext.typeface = Constants.almmsht
|
||||||
|
binding.tvLast.typeface = Constants.almmsht
|
||||||
|
|
||||||
|
binding.vpKeywords.adapter = mAdapter
|
||||||
|
binding.vpKeywords.offscreenPageLimit = 3
|
||||||
|
val recyclerView = binding.vpKeywords.getChildAt(0) as RecyclerView
|
||||||
|
recyclerView.setPadding(DensityUtils.dp2px(24f), 0, DensityUtils.dp2px(24f), 0)
|
||||||
|
recyclerView.setClipToPadding(false)
|
||||||
|
binding.vpKeywords.setPageTransformer(ZoomOutPageTransformer())
|
||||||
|
|
||||||
binding.rvSelectedKeywords.adapter = selectedAdapter
|
binding.rvSelectedKeywords.adapter = selectedAdapter
|
||||||
binding.rvSelectedKeywords.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(10f), DensityUtils.dp2px(10f)))
|
binding.rvSelectedKeywords.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(12f), DensityUtils.dp2px(12f)))
|
||||||
selectedAdapter.addData(HotWordEntity.Child(id = -1, name = "自定义", isChecked = true))
|
|
||||||
setKeywordCount()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLazyLoad() {
|
override fun onLazyLoad() {
|
||||||
super.onLazyLoad()
|
super.onLazyLoad()
|
||||||
hotWordChildList.addAll(GuideFragment.hotWordList)
|
mAdapter.setList(GuideFragment.hotWordList)
|
||||||
hotWordChildList.forEach { item ->
|
binding.vpKeywords.setCurrentItem(1000 * mAdapter.data.size, false)
|
||||||
binding.tabLayout.addView(createTab(item.name))
|
|
||||||
}
|
|
||||||
|
|
||||||
startAnim()
|
startAnim()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initListener() {
|
override fun initListener() {
|
||||||
super.initListener()
|
super.initListener()
|
||||||
binding.tabLayout.observeIndexChange { fromIndex, toIndex, _, _ ->
|
|
||||||
page = 0
|
|
||||||
tabIndex = toIndex
|
|
||||||
|
|
||||||
if (fromIndex >= 0) {
|
mAdapter.setOnKeywordClickListener { keyword ->
|
||||||
val textView = binding.tabLayout.getChildAt(fromIndex)
|
if (!canClick) return@setOnKeywordClickListener
|
||||||
textView.setBackgroundResource(0)
|
if (!keyword.isChecked && selectedAdapter.data.size == 5) {
|
||||||
}
|
|
||||||
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.ivRefresh.onClick {
|
|
||||||
startRotate()
|
|
||||||
val hotWordChild = hotWordChildList[tabIndex]
|
|
||||||
if (ceil(hotWordChild.children.size / 15.0) > page + 1) {
|
|
||||||
page++
|
|
||||||
} else {
|
|
||||||
page = 0
|
|
||||||
}
|
|
||||||
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) 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个关键词")
|
toast("最多添加5个关键词")
|
||||||
return@setOnItemClickListener
|
return@setOnKeywordClickListener
|
||||||
}
|
}
|
||||||
|
|
||||||
item.isChecked = !item.isChecked
|
if (selectedAdapter.data.find { it.name == keyword.name } == null) {
|
||||||
mAdapter.notifyDataSetChanged()
|
selectedAdapter.addData(keyword)
|
||||||
if (item.isChecked) {
|
binding.tvNodata.gone()
|
||||||
selectedAdapter.addData(item)
|
|
||||||
} else {
|
|
||||||
selectedAdapter.remove(item)
|
|
||||||
}
|
}
|
||||||
setKeywordCount()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedAdapter.setOnItemClickListener { _, _, i ->
|
binding.btnAddKeyword.onClick {
|
||||||
val item = selectedAdapter.getItem(i)
|
val keyword = binding.etKeyword.text.toString().trim()
|
||||||
if (item.id == -1) {
|
if (!TextUtils.isEmpty(keyword)) {
|
||||||
if (selectedAdapter.data.size == 6) {
|
if (selectedAdapter.data.size == 5) {
|
||||||
toast("最多添加5个关键词")
|
toast("最多添加5个关键词")
|
||||||
return@setOnItemClickListener
|
return@onClick
|
||||||
}
|
}
|
||||||
val f = AddKeywordDialog.newInstance()
|
selectedAdapter.addData(HotWordEntity.Child(name = keyword, isChecked = true))
|
||||||
f.setOnBackListener {
|
binding.etKeyword.setText(" ")
|
||||||
selectedAdapter.addData(HotWordEntity.Child(name = it, isChecked = true))
|
binding.tvNodata.gone()
|
||||||
setKeywordCount()
|
|
||||||
}
|
|
||||||
f.show(childFragmentManager, "")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedAdapter.setOnItemChildClickListener { _, view, i ->
|
selectedAdapter.setOnItemChildClickListener { _, view, i ->
|
||||||
val item = selectedAdapter.getItem(i)
|
val item = selectedAdapter.getItem(i)
|
||||||
if (!canClick || item.id == -1) return@setOnItemChildClickListener
|
if (!canClick) return@setOnItemChildClickListener
|
||||||
if (view.id == R.id.iv_delete) {
|
if (view.id == R.id.iv_delete) {
|
||||||
selectedAdapter.remove(item)
|
selectedAdapter.remove(item)
|
||||||
item.isChecked = false
|
item.isChecked = false
|
||||||
mAdapter.notifyDataSetChanged()
|
if (selectedAdapter.data.isEmpty()) {
|
||||||
setKeywordCount()
|
binding.tvNodata.visible()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun initObserve() {
|
binding.layoutNext.onClick {
|
||||||
super.initObserve()
|
if (!canClick) return@onClick
|
||||||
mViewModel.totalLiveData.observe(this) {
|
if (selectedAdapter.data.isEmpty()) {
|
||||||
GuideFragment.totalInfo = it
|
toast("请添加关键词")
|
||||||
RxBus.defaultInstance.post(GuideEvent(4))
|
return@onClick
|
||||||
|
}
|
||||||
|
GuideFragment.keywordList.clear()
|
||||||
|
GuideFragment.keywordList.addAll(selectedAdapter.data)
|
||||||
|
RxBus.defaultInstance.post(GuideEvent(3))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun setKeywordCount() {
|
binding.tvLast.onClick {
|
||||||
SpanUtils.with(binding.tvKeywordsCount)
|
RxBus.defaultInstance.post(GuideEvent(1))
|
||||||
.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()
|
|
||||||
}
|
}
|
||||||
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() {
|
private fun startAnim() {
|
||||||
val keyword1TransAnim = ObjectAnimator.ofFloat(binding.layoutKeywords, "translationY", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
val keyword1TransAnim = ObjectAnimator.ofFloat(binding.vpKeywords, "translationY", -ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
keyword1TransAnim.duration = 1000
|
keyword1TransAnim.duration = 1000
|
||||||
keyword1TransAnim.startDelay = 200
|
keyword1TransAnim.startDelay = 200
|
||||||
keyword1TransAnim.addListener(onStart = {
|
keyword1TransAnim.addListener(onStart = {
|
||||||
binding.layoutKeywords.visible()
|
binding.vpKeywords.visible()
|
||||||
})
|
})
|
||||||
|
|
||||||
val keyword2TransAnim = ObjectAnimator.ofFloat(binding.layoutSelectedKeywords, "translationY", ScreenUtils.getScreenWidth().toFloat(), 0f)
|
val keyword2TransAnim = ObjectAnimator.ofFloat(binding.layoutSelectedKeywords, "translationY", ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
keyword2TransAnim.duration = 1000
|
keyword2TransAnim.duration = 1000
|
||||||
keyword2TransAnim.startDelay = 600
|
keyword2TransAnim.startDelay = 600
|
||||||
keyword2TransAnim.addListener(onStart = {
|
keyword2TransAnim.addListener(onStart = {
|
||||||
binding.layoutSelectedKeywords.visible()
|
binding.layoutSelectedKeywords.visible()
|
||||||
})
|
})
|
||||||
|
|
||||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
val titleTransAnim = ObjectAnimator.ofFloat(binding.layoutTitle, "translationY", -ScreenUtils.getScreenHeight().toFloat(), 0f)
|
||||||
titleTransAnim.duration = 1000
|
titleTransAnim.duration = 1000
|
||||||
titleTransAnim.startDelay = 200
|
titleTransAnim.startDelay = 200
|
||||||
titleTransAnim.addListener(onStart = {
|
titleTransAnim.addListener(onStart = {
|
||||||
binding.ivTitle.visible()
|
binding.layoutTitle.visible()
|
||||||
})
|
})
|
||||||
|
|
||||||
val descTransAnim = ObjectAnimator.ofFloat(binding.ivDesc, "translationY", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
val btnTransAnim = ObjectAnimator.ofFloat(binding.layoutBottom, "alpha", 0f, 1f)
|
||||||
descTransAnim.duration = 1000
|
|
||||||
titleTransAnim.startDelay = 200
|
|
||||||
descTransAnim.addListener(onStart = {
|
|
||||||
binding.ivDesc.visible()
|
|
||||||
})
|
|
||||||
|
|
||||||
val btnTransAnim = ObjectAnimator.ofFloat(binding.ivBtn, "translationY", DensityUtils.dp2px(100f).toFloat(), 0f)
|
|
||||||
btnTransAnim.duration = 1000
|
btnTransAnim.duration = 1000
|
||||||
btnTransAnim.startDelay = 800
|
btnTransAnim.startDelay = 1400
|
||||||
btnTransAnim.interpolator = LinearInterpolator()
|
|
||||||
btnTransAnim.addListener(onStart = {
|
btnTransAnim.addListener(onStart = {
|
||||||
binding.ivBtn.visible()
|
binding.layoutBottom.visible()
|
||||||
}, onEnd = {
|
}, onEnd = {
|
||||||
canClick = true
|
canClick = true
|
||||||
})
|
})
|
||||||
|
|
@ -237,7 +149,6 @@ class GuideItem3Fragment : BaseFragment<FragmentGuideItem3Binding, GuideViewMode
|
||||||
keyword1TransAnim,
|
keyword1TransAnim,
|
||||||
keyword2TransAnim,
|
keyword2TransAnim,
|
||||||
titleTransAnim,
|
titleTransAnim,
|
||||||
descTransAnim,
|
|
||||||
btnTransAnim
|
btnTransAnim
|
||||||
)
|
)
|
||||||
animSet.start()
|
animSet.start()
|
||||||
|
|
|
||||||
|
|
@ -1,46 +1,44 @@
|
||||||
package com.cheng.blzb.ui.fragment.guide.item
|
package com.cheng.blzb.ui.fragment.guide.item
|
||||||
|
|
||||||
import android.animation.AnimatorSet
|
|
||||||
import android.animation.ObjectAnimator
|
import android.animation.ObjectAnimator
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import androidx.core.animation.addListener
|
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.bean.AreaEntity
|
||||||
|
import com.cheng.blzb.bean.HotWordEntity
|
||||||
import com.cheng.blzb.common.Constants
|
import com.cheng.blzb.common.Constants
|
||||||
import com.cheng.blzb.databinding.FragmentGuideItem4Binding
|
import com.cheng.blzb.databinding.FragmentGuideItem4Binding
|
||||||
import com.cheng.blzb.event.GuideEvent
|
import com.cheng.blzb.event.GuideEvent
|
||||||
import com.cheng.blzb.manager.UserConfigManager
|
import com.cheng.blzb.manager.UserConfigManager
|
||||||
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
import com.cheng.blzb.ui.fragment.guide.GuideFragment
|
||||||
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
import com.cheng.blzb.ui.fragment.guide.GuideViewModel
|
||||||
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem4Area1Adapter
|
import com.cheng.blzb.ui.fragment.guide.adapter.GuideItem4Adapter
|
||||||
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.common.RxBus
|
||||||
import com.example.base.extensions.onClick
|
import com.example.base.extensions.onClick
|
||||||
import com.example.base.extensions.toast
|
import com.example.base.extensions.toast
|
||||||
import com.example.base.extensions.visible
|
import com.example.base.extensions.visible
|
||||||
import com.example.base.ui.BaseFragment
|
import com.example.base.ui.BaseFragment
|
||||||
import com.example.base.utils.DensityUtils
|
|
||||||
import com.example.base.utils.ScreenUtils
|
import com.example.base.utils.ScreenUtils
|
||||||
|
|
||||||
class GuideItem4Fragment : BaseFragment<FragmentGuideItem4Binding, GuideViewModel>() {
|
class GuideItem4Fragment : BaseFragment<FragmentGuideItem4Binding, GuideViewModel>() {
|
||||||
private val area1Adapter by lazy { GuideItem4Area1Adapter() }
|
|
||||||
|
|
||||||
private val area2Adapter by lazy { GuideItem4Area2Adapter() }
|
private val mAdapter by lazy { GuideItem4Adapter() }
|
||||||
|
|
||||||
|
private val hotWordChildList = mutableListOf<HotWordEntity.Child>()
|
||||||
|
|
||||||
private var canClick = false
|
private var canClick = false
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
super.initView()
|
super.initView()
|
||||||
binding.btnNext.typeface = Constants.almmsht
|
binding.tvTitle.typeface = Constants.pmzdbt
|
||||||
|
binding.tvNext.typeface = Constants.almmsht
|
||||||
|
binding.tvLast.typeface = Constants.almmsht
|
||||||
|
|
||||||
binding.rvArea1.adapter = area1Adapter
|
binding.mRecyclerView.adapter = mAdapter
|
||||||
binding.rvArea2.adapter = area2Adapter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLazyLoad() {
|
override fun onLazyLoad() {
|
||||||
super.onLazyLoad()
|
super.onLazyLoad()
|
||||||
|
hotWordChildList.addAll(GuideFragment.hotWordList)
|
||||||
if (UserConfigManager.getAreaList().isNotEmpty()) {
|
if (UserConfigManager.getAreaList().isNotEmpty()) {
|
||||||
setData()
|
setData()
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -51,51 +49,26 @@ class GuideItem4Fragment : BaseFragment<FragmentGuideItem4Binding, GuideViewMode
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun initListener() {
|
override fun initListener() {
|
||||||
super.initListener()
|
super.initListener()
|
||||||
area1Adapter.setOnItemClickListener { _, _, position ->
|
|
||||||
val item = area1Adapter.getItem(position)
|
|
||||||
area1Adapter.data.find { it.isChecked }?.isChecked = false
|
|
||||||
item.isChecked = true
|
|
||||||
|
|
||||||
scrollToPosition(position)
|
binding.layoutNext.onClick {
|
||||||
}
|
|
||||||
|
|
||||||
area2Adapter.setOnCityClickListener {
|
|
||||||
val selectList = mutableListOf<AreaEntity>()
|
|
||||||
area2Adapter.data.forEach { area ->
|
|
||||||
selectList.addAll(area.children.filter { it.isChecked })
|
|
||||||
}
|
|
||||||
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.btnNext.onClick {
|
|
||||||
if (canClick) {
|
if (canClick) {
|
||||||
val selectList = mutableListOf<AreaEntity>()
|
val selectList = mutableListOf<AreaEntity>()
|
||||||
area1Adapter.data.forEach { area ->
|
mAdapter.data.forEach { area ->
|
||||||
selectList.addAll(area.children.filter { it.isChecked })
|
selectList.addAll(area.children.filter { it.isChecked })
|
||||||
}
|
}
|
||||||
if (selectList.isEmpty()) {
|
if (selectList.isEmpty()) {
|
||||||
toast("请选择地区")
|
toast("请选择地区")
|
||||||
return@onClick
|
return@onClick
|
||||||
}
|
}
|
||||||
GuideFragment.cityList.addAll(selectList)
|
val cityIds = selectList.map { it.id }
|
||||||
RxBus.defaultInstance.post(GuideEvent(2))
|
val keywords = GuideFragment.keywordList.map { it.name }
|
||||||
|
mViewModel.getTotalBidInfo(keywords.joinToString(","), cityIds.joinToString(","), "${hotWordChildList.size}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.tvLast.onClick {
|
||||||
|
RxBus.defaultInstance.post(GuideEvent(2))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initObserve() {
|
override fun initObserve() {
|
||||||
|
|
@ -104,76 +77,29 @@ class GuideItem4Fragment : BaseFragment<FragmentGuideItem4Binding, GuideViewMode
|
||||||
UserConfigManager.saveAreaList(it)
|
UserConfigManager.saveAreaList(it)
|
||||||
setData()
|
setData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mViewModel.totalLiveData.observe(this) {
|
||||||
|
GuideFragment.totalInfo = it
|
||||||
|
RxBus.defaultInstance.post(GuideEvent(4))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setData() {
|
private fun setData() {
|
||||||
val areaList = UserConfigManager.getAreaList()
|
val areaList = UserConfigManager.getAreaList()
|
||||||
areaList.add(0, AreaEntity(0, name = "全国地区", isChecked = true))
|
areaList.add(0, AreaEntity(0, name = "全国地区", isChecked = true))
|
||||||
area1Adapter.setList(areaList)
|
mAdapter.setList(areaList)
|
||||||
area2Adapter.setList(areaList)
|
|
||||||
startAnim()
|
startAnim()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun scrollToPosition(position: Int) {
|
|
||||||
binding.rvArea2.layoutManager?.startSmoothScroll(
|
|
||||||
LinearTopSmoothScroller(requireContext(), true)
|
|
||||||
.apply { targetPosition = position }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startAnim() {
|
private fun startAnim() {
|
||||||
val titleTransAnim = ObjectAnimator.ofFloat(binding.ivTitle, "translationX", -DensityUtils.dp2px(200f).toFloat(), 0f)
|
val contentTransAnim = ObjectAnimator.ofFloat(binding.layoutContent, "translationX", ScreenUtils.getScreenWidth().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.duration = 1000
|
||||||
|
contentTransAnim.startDelay = 400
|
||||||
contentTransAnim.addListener(onStart = {
|
contentTransAnim.addListener(onStart = {
|
||||||
binding.layoutContent.visible()
|
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()
|
|
||||||
}, onEnd = {
|
}, onEnd = {
|
||||||
canClick = true
|
canClick = true
|
||||||
})
|
})
|
||||||
|
contentTransAnim.start()
|
||||||
val animSet = AnimatorSet()
|
|
||||||
animSet.playTogether(titleTransAnim, descTransAnim, contentTransAnim, icon1TransAnim, icon2TransAnim, countTransAnim, btnTransAnim)
|
|
||||||
animSet.start()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -16,6 +16,7 @@ import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.rxjava3.core.Observable
|
import io.reactivex.rxjava3.core.Observable
|
||||||
import io.reactivex.rxjava3.disposables.Disposable
|
import io.reactivex.rxjava3.disposables.Disposable
|
||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
|
import org.jetbrains.anko.sdk27.listeners.onTouch
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class QYZCFragment : BaseFragment<FragmentQyzcBinding, QYZCViewModel>() {
|
class QYZCFragment : BaseFragment<FragmentQyzcBinding, QYZCViewModel>() {
|
||||||
|
|
@ -49,6 +50,7 @@ class QYZCFragment : BaseFragment<FragmentQyzcBinding, QYZCViewModel>() {
|
||||||
|
|
||||||
override fun initListener() {
|
override fun initListener() {
|
||||||
super.initListener()
|
super.initListener()
|
||||||
|
binding.rvCompany.onTouch { _, _ -> true }
|
||||||
|
|
||||||
binding.tvArea.onClick {
|
binding.tvArea.onClick {
|
||||||
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.cheng.blzb.widget
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import androidx.viewpager2.widget.ViewPager2
|
||||||
|
|
||||||
|
class ZoomOutPageTransformer : ViewPager2.PageTransformer {
|
||||||
|
|
||||||
|
override fun transformPage(page: View, position: Float) {
|
||||||
|
if (position >= -1.0f && position <= 0.0f) {
|
||||||
|
//控制左侧滑入或者滑出的缩放比例
|
||||||
|
page.scaleX = 1 + position * 0.05f
|
||||||
|
page.scaleY = 1 + position * 0.2f
|
||||||
|
} else if (position > 0.0f && position < 1.0f) {
|
||||||
|
//控制右侧滑入或者滑出的缩放比例
|
||||||
|
page.scaleX = 1 - position * 0.05f
|
||||||
|
page.scaleY = 1 - position * 0.2f
|
||||||
|
} else {
|
||||||
|
//控制其他View缩放比例
|
||||||
|
page.scaleX = 0.95f
|
||||||
|
page.scaleY = 0.8f
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#062F79" />
|
||||||
|
<corners android:radius="@dimen/dp_5" />
|
||||||
|
</shape>
|
||||||
|
|
@ -6,22 +6,26 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="#00071A">
|
android:background="#00071A">
|
||||||
|
|
||||||
<ImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_bg"
|
android:id="@+id/iv_bg"
|
||||||
android:src="@mipmap/ic_guide_item1_bg"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
android:scaleType="fitXY"
|
android:scaleType="fitXY"
|
||||||
|
android:src="@mipmap/ic_guide_item1_bg"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
tool:visibility="visible"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_height="match_parent"/>
|
tool:visibility="visible" />
|
||||||
|
|
||||||
<ImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_flow"
|
android:id="@+id/iv_flow"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="1018dp"
|
||||||
android:visibility="invisible"
|
android:layout_height="1058dp"
|
||||||
tool:visibility="visible"
|
|
||||||
android:src="@mipmap/ic_guide_item1_flow"
|
android:src="@mipmap/ic_guide_item1_flow"
|
||||||
android:layout_height="match_parent"/>
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tool:visibility="visible" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/layout_title"
|
android:id="@+id/layout_title"
|
||||||
|
|
@ -120,6 +124,7 @@
|
||||||
android:src="@mipmap/ic_guide_item1_title_light"
|
android:src="@mipmap/ic_guide_item1_title_light"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintDimensionRatio="w,149:180"
|
app:layout_constraintDimensionRatio="w,149:180"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tool:visibility="visible" />
|
tool:visibility="visible" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -129,31 +134,31 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_28"
|
android:layout_height="@dimen/dp_28"
|
||||||
android:layout_marginTop="@dimen/dp_26"
|
android:layout_marginTop="@dimen/dp_26"
|
||||||
tool:listitem="@layout/listitem_guide_item1_company"
|
|
||||||
android:background="@mipmap/ic_guide_item1_rv_bg"
|
android:background="@mipmap/ic_guide_item1_rv_bg"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
tool:visibility="visible"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
app:layout_constraintTop_toBottomOf="@id/layout_title" />
|
app:layout_constraintTop_toBottomOf="@id/layout_title"
|
||||||
|
tool:listitem="@layout/listitem_guide_item1_company"
|
||||||
|
tool:visibility="visible" />
|
||||||
|
|
||||||
<org.libpag.PAGImageView
|
<org.libpag.PAGImageView
|
||||||
android:id="@+id/pagView"
|
android:id="@+id/pagView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
app:layout_constraintTop_toBottomOf="@id/rv_company"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toTopOf="@id/layout_btn"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
tool:visibility="visible"
|
app:layout_constraintBottom_toTopOf="@id/layout_next"
|
||||||
android:layout_height="wrap_content"/>
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/rv_company"
|
||||||
|
tool:visibility="visible" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/layout_btn"
|
android:id="@+id/layout_next"
|
||||||
android:layout_width="214dp"
|
android:layout_width="214dp"
|
||||||
android:layout_height="@dimen/dp_70"
|
android:layout_height="@dimen/dp_70"
|
||||||
android:layout_marginBottom="@dimen/dp_34"
|
android:layout_marginBottom="@dimen/dp_34"
|
||||||
android:background="@mipmap/ic_guide_item1_btn"
|
android:background="@mipmap/ic_guide_btn_bg"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
@ -161,13 +166,10 @@
|
||||||
tool:visibility="visible">
|
tool:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_btn"
|
android:id="@+id/tv_next"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_15"
|
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:text="开启大数据时代"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_17"
|
android:textSize="@dimen/sp_17"
|
||||||
|
|
@ -175,6 +177,24 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_l"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_r"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -6,416 +6,104 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@mipmap/ic_guide_bg">
|
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: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
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/layout_option1"
|
android:id="@+id/layout_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="@dimen/dp_60"
|
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintBottom_toTopOf="@id/layout_option3"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/iv_desc"
|
|
||||||
tool:visibility="visible">
|
tool:visibility="visible">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_icon1"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="@dimen/dp_60"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="@dimen/dp_60"
|
android:layout_marginTop="@dimen/dp_25"
|
||||||
android:src="@mipmap/ic_guide_item3_icon1"
|
android:src="@mipmap/ic_guide_item_title_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_title"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_65"
|
||||||
|
android:shadowColor="#001C52"
|
||||||
|
android:shadowDy="2"
|
||||||
|
android:shadowRadius="2"
|
||||||
|
android:text="行业选择"
|
||||||
|
android:textColor="@color/color_e6ffff"
|
||||||
|
android:textSize="@dimen/sp_34"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_check1"
|
android:id="@+id/iv_desc"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/ic_guide_item2_checked"
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
android:visibility="gone"
|
android:src="@mipmap/ic_guide_item2_desc"
|
||||||
app:layout_constraintStart_toStartOf="@id/iv_icon1"
|
app:layout_constraintEnd_toEndOf="@id/tv_title"
|
||||||
app:layout_constraintTop_toTopOf="@id/iv_icon1" />
|
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||||
|
|
||||||
<TextView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/tv_name1"
|
android:id="@+id/mRecyclerView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_18"
|
||||||
android:drawableStart="@mipmap/ic_guide_item3_star_default"
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
android:drawablePadding="@dimen/dp_2"
|
android:layout_marginEnd="@dimen/dp_18"
|
||||||
android:gravity="center"
|
android:overScrollMode="never"
|
||||||
android:text="工程建筑"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
android:textColor="@color/color_222222"
|
app:layout_constraintBottom_toTopOf="@id/layout_next"
|
||||||
android:textSize="@dimen/sp_14"
|
app:layout_constraintTop_toBottomOf="@id/iv_desc"
|
||||||
|
app:spanCount="2"
|
||||||
|
tool:itemCount="8"
|
||||||
|
tool:listitem="@layout/listitem_guide_item2" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_next"
|
||||||
|
android:layout_width="214dp"
|
||||||
|
android:layout_height="@dimen/dp_70"
|
||||||
|
android:layout_marginBottom="@dimen/dp_34"
|
||||||
|
android:background="@mipmap/ic_guide_btn_bg"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_icon1" />
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_next"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
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.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_l"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_r"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</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_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_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_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: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_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: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"
|
|
||||||
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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -4,168 +4,200 @@
|
||||||
xmlns:tool="http://schemas.android.com/tools"
|
xmlns:tool="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@mipmap/ic_guide_bg">
|
android:background="@mipmap/ic_guide_bg"
|
||||||
|
android:clipChildren="false">
|
||||||
<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_item4_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_item4_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
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/layout_keywords"
|
android:id="@+id/layout_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
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:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_desc"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tool:visibility="visible">
|
tool:visibility="visible">
|
||||||
|
|
||||||
<com.angcyo.tablayout.DslTabLayout
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/tabLayout"
|
android:layout_width="wrap_content"
|
||||||
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_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_11"
|
android:layout_marginTop="@dimen/dp_25"
|
||||||
android:gravity="center_vertical"
|
android:src="@mipmap/ic_guide_item_title_bg"
|
||||||
android:orientation="horizontal"
|
app:layout_constraintEnd_toEndOf="@id/tv_title"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tabLayout">
|
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:id="@+id/tv_title"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="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_height="wrap_content"
|
||||||
android:layout_margin="@dimen/dp_14"
|
android:layout_marginTop="@dimen/dp_65"
|
||||||
android:background="@drawable/shape_white_cor14"
|
android:shadowColor="#001C52"
|
||||||
android:overScrollMode="never"
|
android:shadowDy="2"
|
||||||
android:padding="@dimen/dp_14"
|
android:shadowRadius="2"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
android:text="行业商机"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:textColor="@color/color_e6ffff"
|
||||||
app:layout_constraintTop_toBottomOf="@id/layout_base_info"
|
android:textSize="@dimen/sp_34"
|
||||||
app:spanCount="3"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tool:itemCount="18"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tool:listitem="@layout/listitem_guide_item3" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_desc"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:src="@mipmap/ic_guide_item3_desc"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_title"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.viewpager2.widget.ViewPager2
|
||||||
|
android:id="@+id/vp_keywords"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/layout_selected_keywords"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_title"
|
||||||
|
tool:visibility="visible" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/layout_selected_keywords"
|
android:id="@+id/layout_selected_keywords"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
android:layout_marginTop="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
android:background="@drawable/shape_f5f8ff_cor16"
|
android:background="@mipmap/ic_guide_item3_keyword_bg2"
|
||||||
android:padding="@dimen/dp_14"
|
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_constraintTop_toBottomOf="@id/layout_keywords"
|
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/vp_keywords"
|
||||||
tool:visibility="visible">
|
tool:visibility="visible">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/et_keyword"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_23"
|
||||||
|
android:layout_marginTop="@dimen/dp_23"
|
||||||
|
android:layout_marginEnd="@dimen/dp_23"
|
||||||
|
android:background="@drawable/shape_guide_custom_keyword_bg"
|
||||||
|
android:hint="请输入自定义关键词"
|
||||||
|
android:maxLength="10"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:paddingStart="@dimen/dp_10"
|
||||||
|
android:paddingEnd="@dimen/dp_54"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textColorHint="@color/white"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.cheng.blzb.widget.CommonShapeView
|
||||||
|
android:id="@+id/btn_add_keyword"
|
||||||
|
android:layout_width="@dimen/dp_46"
|
||||||
|
android:layout_height="@dimen/dp_24"
|
||||||
|
android:layout_marginEnd="@dimen/dp_6"
|
||||||
|
android:text="添加"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_4"
|
||||||
|
app:csb_fillColor="@color/color_125ffe"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/et_keyword"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/et_keyword"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/et_keyword" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_keywords_count"
|
android:id="@+id/tv_nodata"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="已添加关键词(5/5)"
|
android:text="暂无数据"
|
||||||
android:textColor="@color/color_666666"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_12"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintBottom_toBottomOf="@id/rv_selected_keywords"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintEnd_toEndOf="@id/rv_selected_keywords"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/rv_selected_keywords"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/rv_selected_keywords" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_selected_keywords"
|
android:id="@+id/rv_selected_keywords"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_76"
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:background="@drawable/shape_white_cor14"
|
android:layout_marginTop="@dimen/dp_45"
|
||||||
android:paddingStart="@dimen/dp_12"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:paddingTop="@dimen/dp_10"
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
android:paddingEnd="@dimen/dp_12"
|
|
||||||
android:paddingBottom="@dimen/dp_10"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_keywords_count"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_keyword"
|
||||||
app:spanCount="3"
|
app:spanCount="3"
|
||||||
tool:itemCount="5"
|
tool:itemCount="5"
|
||||||
tool:listitem="@layout/listitem_guide3_selected_keyword" />
|
tool:listitem="@layout/listitem_guide_item3_selected_keyword" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_bottom"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_20"
|
||||||
|
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_next"
|
||||||
|
android:layout_width="214dp"
|
||||||
|
android:layout_height="@dimen/dp_70"
|
||||||
|
android:layout_marginBottom="@dimen/dp_17"
|
||||||
|
android:background="@mipmap/ic_guide_btn_bg"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_last"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_next"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
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.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_l"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_r"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_last"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,141 +6,134 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@mipmap/ic_guide_bg">
|
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
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/layout_content"
|
android:id="@+id/layout_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
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"
|
android:visibility="invisible"
|
||||||
app:layout_constraintBottom_toTopOf="@id/iv_icon2"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_desc"
|
|
||||||
tool:visibility="visible">
|
tool:visibility="visible">
|
||||||
|
|
||||||
<TextView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/layout_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_25"
|
||||||
|
android:src="@mipmap/ic_guide_item_title_bg"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_title"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_65"
|
||||||
|
android:shadowColor="#001C52"
|
||||||
|
android:shadowDy="2"
|
||||||
|
android:shadowRadius="2"
|
||||||
|
android:text="地区选择"
|
||||||
|
android:textColor="@color/color_e6ffff"
|
||||||
|
android:textSize="@dimen/sp_34"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_desc"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:src="@mipmap/ic_guide_item4_desc"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_title"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/mRecyclerView"
|
||||||
|
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:background="@mipmap/ic_guide_item4_bg"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="@dimen/dp_10"
|
||||||
|
android:layout_marginBottom="@dimen/dp_30"
|
||||||
|
android:paddingBottom="@dimen/dp_10"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/layout_title"
|
||||||
|
tool:listitem="@layout/listitem_guide_item4" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_bottom"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_20"
|
android:layout_marginBottom="@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_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_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/rv_area1"
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
|
||||||
tool:listitem="@layout/listitem_guide_area2" />
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_next"
|
||||||
|
android:layout_width="214dp"
|
||||||
|
android:layout_height="@dimen/dp_70"
|
||||||
|
android:layout_marginBottom="@dimen/dp_17"
|
||||||
|
android:background="@mipmap/ic_guide_btn_bg"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/tv_last"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_next"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
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.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_l"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:src="@mipmap/ic_guide_arrow_r"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_next"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_next" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_last"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?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>
|
|
||||||
|
|
@ -11,23 +11,17 @@
|
||||||
app:layout_constraintDimensionRatio="h,1:1"
|
app:layout_constraintDimensionRatio="h,1:1"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<View
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_bg"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:src="@mipmap/ic_guide_item4_default"
|
||||||
android:background="@drawable/shape_80000000_cor6"
|
android:background="@drawable/shape_80000000_cor6"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/iv_cover"
|
app:layout_constraintBottom_toBottomOf="@id/iv_cover"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
||||||
app:layout_constraintStart_toStartOf="@id/iv_cover"
|
app:layout_constraintStart_toStartOf="@id/iv_cover"
|
||||||
app:layout_constraintTop_toTopOf="@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
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="h,163:103"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_icon"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="@dimen/dp_8"
|
||||||
|
android:src="@mipmap/ic_guide_item2_icon1" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:src="@mipmap/ic_guide_item2_checked" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="工程建设"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16" />
|
||||||
|
</FrameLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -1,34 +1,78 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/shape_f5f8ff_cor4">
|
android:background="@mipmap/ic_guide_item3_keyword_bg1"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tool="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_base_info"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/dp_20"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="行业交易规模"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_amount"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_15"
|
||||||
|
android:drawableStart="@mipmap/ic_guide_fire"
|
||||||
|
android:drawablePadding="@dimen/dp_2"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="877.78亿"
|
||||||
|
android:textColor="#15E0E4"
|
||||||
|
android:textSize="@dimen/sp_10" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="@dimen/dp_30"
|
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
|
||||||
android:layout_marginEnd="@dimen/dp_2"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="数字电路"
|
|
||||||
android:textColor="@color/color_1a1a1a"
|
|
||||||
android:textSize="@dimen/sp_12"
|
|
||||||
app:csb_drawablePosition="right"
|
|
||||||
app:csb_fillColor="#F5F8FF"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/iv_add"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/iv_add"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dp_6"
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
android:src="@mipmap/ic_guide_item3_checked"
|
android:layout_marginTop="@dimen/dp_18"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:fontFamily="sans-serif-medium"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:text="信息电子"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_refresh"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_19"
|
||||||
|
android:src="@mipmap/ic_refresh_guide_keywords"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_name"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_name"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_name" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/mRecyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_19"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
|
android:layout_marginBottom="@dimen/dp_25"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||||
|
app:spanCount="3"
|
||||||
|
tool:itemCount="18"
|
||||||
|
tool:listitem="@layout/listitem_guide_item3_keyword" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
android:background="@mipmap/ic_guide_item3_default">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="数字电路"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_12"/>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -2,37 +2,33 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_32"
|
||||||
android:background="@drawable/shape_f5f8ff_cor4">
|
android:background="@mipmap/ic_guide_item3_checked"
|
||||||
|
android:padding="@dimen/dp_8">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="@dimen/dp_30"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
|
||||||
android:layout_marginEnd="@dimen/dp_2"
|
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:text="数字电路"
|
|
||||||
android:scrollHorizontally="true"
|
|
||||||
android:marqueeRepeatLimit="marquee_forever"
|
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:textColor="@color/color_125ffe"
|
android:gravity="center_vertical"
|
||||||
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:scrollHorizontally="true"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="数字电路"
|
||||||
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_12"
|
android:textSize="@dimen/sp_12"
|
||||||
app:csb_drawablePosition="right"
|
|
||||||
app:csb_fillColor="#F5F8FF"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/iv_delete"
|
app:layout_constraintEnd_toStartOf="@id/iv_delete"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/iv_delete"
|
android:id="@+id/iv_delete"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/dp_14"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/dp_14"
|
||||||
android:layout_marginEnd="@dimen/dp_6"
|
android:src="@mipmap/ic_delete_subscribe_keyword"
|
||||||
android:src="@mipmap/ic_guide_item4_delete"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
@ -7,30 +7,25 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_46"
|
android:layout_height="@dimen/dp_50"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:text="全国地区"
|
android:text="全国地区"
|
||||||
android:textColor="@color/color_222222"
|
android:textColor="@color/white"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
app:layout_constraintEnd_toStartOf="@id/tv_check_all"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/tv_check_all"
|
android:id="@+id/iv_check_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/dp_46"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:drawableStart="@mipmap/ic_check_true"
|
android:src="@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_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintBottom_toBottomOf="@id/tv_name"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_name" />
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_city"
|
android:id="@+id/rv_city"
|
||||||
|
|
@ -41,7 +36,7 @@
|
||||||
android:overScrollMode="never"
|
android:overScrollMode="never"
|
||||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||||
app:spanCount="2"
|
app:spanCount="3"
|
||||||
tool:itemCount="2"
|
tool:itemCount="3"
|
||||||
tool:listitem="@layout/listitem_guide_city" />
|
tool:listitem="@layout/listitem_guide_city" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 773 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 546 B |
|
After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 828 B |
|
Before Width: | Height: | Size: 508 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 598 B |
|
Before Width: | Height: | Size: 472 B |
|
Before Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 530 B |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 774 B |