添加代理记账,企业注册,标书制作,资质代办页面
|
|
@ -1,6 +1,7 @@
|
|||
package com.cheng.bole.bean
|
||||
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import java.io.Serializable
|
||||
|
||||
data class MenuEntity(
|
||||
|
|
@ -11,18 +12,22 @@ data class MenuEntity(
|
|||
companion object {
|
||||
fun getHomeMenu(): List<MenuEntity> {
|
||||
val list = mutableListOf<MenuEntity>()
|
||||
list.add(MenuEntity("1", R.mipmap.ic_home_icon1, "代理记账"))
|
||||
list.add(MenuEntity("2", R.mipmap.ic_home_icon2, "企业注册"))
|
||||
list.add(MenuEntity("3", R.mipmap.ic_home_icon3, "标书制作"))
|
||||
list.add(MenuEntity("4", R.mipmap.ic_home_icon4, "资质代办"))
|
||||
list.add(MenuEntity("5", R.mipmap.ic_home_icon5, "招标公告"))
|
||||
list.add(MenuEntity("6", R.mipmap.ic_home_icon6, "采购公告"))
|
||||
list.add(MenuEntity("7", R.mipmap.ic_home_icon7, "招标预告"))
|
||||
list.add(MenuEntity("8", R.mipmap.ic_home_icon8, "合同公告"))
|
||||
list.add(MenuEntity("9", R.mipmap.ic_home_icon9, "中标结果"))
|
||||
list.add(MenuEntity("10", R.mipmap.ic_home_icon10, "竟争性磋商"))
|
||||
list.add(MenuEntity("11", R.mipmap.ic_home_icon11, "更正公告"))
|
||||
list.add(MenuEntity("12", R.mipmap.ic_home_icon12, "终止公告"))
|
||||
list.add(MenuEntity("dljz", R.mipmap.ic_home_icon1, "代理记账"))
|
||||
list.add(MenuEntity("qyzc", R.mipmap.ic_home_icon2, "企业注册"))
|
||||
list.add(MenuEntity("bszz", R.mipmap.ic_home_icon3, "标书制作"))
|
||||
list.add(MenuEntity("zzdb", R.mipmap.ic_home_icon4, "资质代办"))
|
||||
UserConfigManager.getBidTypes().forEach {
|
||||
when(it.name) {
|
||||
"招标公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon5, it.name))
|
||||
"采购公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon6, it.name))
|
||||
"招标计划" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon7, it.name))
|
||||
"合同公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon8, it.name))
|
||||
"中标公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon9, it.name))
|
||||
"竞争性磋商" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon10, it.name))
|
||||
"更正公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon11, it.name))
|
||||
"终止公告" -> list.add(MenuEntity(it.id, R.mipmap.ic_home_icon12, it.name))
|
||||
}
|
||||
}
|
||||
return list
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ data class MerchantGoodsBean(
|
|||
val company: CompanyBean,
|
||||
val contact: List<ContactsInfoBean>,
|
||||
val create_time: String,
|
||||
val file: List<UploadFileBean>,
|
||||
val file: List<UploadFileEntity>,
|
||||
val goods_description: String,
|
||||
val goods_name: String,
|
||||
val goods_price: String,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.cheng.bole.bean
|
|||
|
||||
import java.io.Serializable
|
||||
|
||||
data class UploadFileBean(
|
||||
data class UploadFileEntity(
|
||||
var id: String = "",
|
||||
var url: String = ""
|
||||
): Serializable
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
package com.cheng.bole.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
class UploadImgEntity : Serializable {
|
||||
var id = ""
|
||||
var url = ""
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@ package com.cheng.bole.bean
|
|||
|
||||
import java.io.Serializable
|
||||
|
||||
data class QualificationInfoBean(
|
||||
data class ZZDBInfoBean(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val createTime: String,
|
||||
|
|
@ -14,5 +14,5 @@ data class QualificationInfoBean(
|
|||
val range: String,
|
||||
val status: String,
|
||||
val updateTime: String,
|
||||
val children: List<QualificationInfoBean>
|
||||
val children: List<ZZDBInfoBean>
|
||||
) : Serializable
|
||||
|
|
@ -38,6 +38,8 @@ object EventConstants {
|
|||
|
||||
const val JUMP_TO_BID_SEARCH = "client.jump.to.bid.search" //跳转到搜索
|
||||
|
||||
const val JUMP_TO_TOOLS = "client.jump.to.tools" //跳转到工具
|
||||
|
||||
const val DIALOG_GO_TO_VIEW = "client.dialog.go.to.view" //前往保存文件的地址查看
|
||||
|
||||
const val JUMP_TO_ABOUT_US = "client.jump.to.about.us" //界面跳转
|
||||
|
|
|
|||
|
|
@ -1,21 +1,31 @@
|
|||
package com.cheng.bole.net
|
||||
|
||||
import com.cheng.bole.bean.AccountEntity
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.bean.BidDetailBean
|
||||
import com.cheng.bole.bean.BidItemBean
|
||||
import com.cheng.bole.bean.BidTypeBean
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.bean.CompanyBean
|
||||
import com.cheng.bole.bean.CorpInfoBean
|
||||
import com.cheng.bole.bean.CouponEntity
|
||||
import com.cheng.bole.bean.GuideTotalBidInfoBean
|
||||
import com.cheng.bole.bean.GuideUpdateInfoBean
|
||||
import com.cheng.bole.bean.HotWordBean
|
||||
import com.cheng.bole.bean.LoginEntity
|
||||
import com.cheng.bole.bean.MerchantGoodsBean
|
||||
import com.cheng.bole.bean.QualificationInfoBean
|
||||
import com.cheng.bole.bean.OrderPayEntity
|
||||
import com.cheng.bole.bean.ZZDBInfoBean
|
||||
import com.cheng.bole.bean.SeatItemBean
|
||||
import com.cheng.bole.bean.SendCodeEntity
|
||||
import com.cheng.bole.bean.SourceBean
|
||||
import com.cheng.bole.bean.SubscriptionBean
|
||||
import com.cheng.bole.bean.SubscriptionMessageBean
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.bean.UserAuthBean
|
||||
import com.cheng.bole.bean.UserConfigEntity
|
||||
import com.cheng.bole.bean.UserEntity
|
||||
import com.cheng.bole.bean.VipGoodsEntity
|
||||
import com.cheng.bole.bean.WxServiceEntity
|
||||
import com.cheng.bole.net.model.HttpBaseResult
|
||||
import com.cheng.bole.net.model.HttpListResult
|
||||
import com.ylqh.cube.bean.CouponActivityEntity
|
||||
|
|
@ -49,19 +59,19 @@ interface ApiService {
|
|||
@Query("ua") ua: String,
|
||||
@Query("imei") imei: String,
|
||||
@Query("cid") cid: String,
|
||||
): HttpBaseResult<com.cheng.bole.bean.UserConfigEntity>
|
||||
): HttpBaseResult<UserConfigEntity>
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
@POST("/api/user/code")
|
||||
suspend fun sendCode(@Body params: Map<String, String>): HttpBaseResult<com.cheng.bole.bean.SendCodeEntity>
|
||||
suspend fun sendCode(@Body params: Map<String, String>): HttpBaseResult<SendCodeEntity>
|
||||
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
@POST("/api/user/login")
|
||||
suspend fun login(@Body requestBody: RequestBody): HttpBaseResult<com.cheng.bole.bean.LoginEntity>
|
||||
suspend fun login(@Body requestBody: RequestBody): HttpBaseResult<LoginEntity>
|
||||
|
||||
/**
|
||||
* 退出登录
|
||||
|
|
@ -85,20 +95,20 @@ interface ApiService {
|
|||
* 获取用户信息
|
||||
*/
|
||||
@GET("/api/user")
|
||||
suspend fun userInfo(): HttpBaseResult<com.cheng.bole.bean.UserEntity>
|
||||
suspend fun userInfo(): HttpBaseResult<UserEntity>
|
||||
|
||||
/**
|
||||
* 获取账号列表
|
||||
*/
|
||||
@GET("/api/user/account")
|
||||
suspend fun accountList(@Query("scene") scene: String): HttpBaseResult<List<com.cheng.bole.bean.AccountEntity>>
|
||||
suspend fun accountList(@Query("scene") scene: String): HttpBaseResult<List<AccountEntity>>
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*/
|
||||
@Multipart
|
||||
@POST("/api/user/upload")
|
||||
suspend fun upload(@Part part: MultipartBody.Part, @Query("scene") scene: String): HttpBaseResult<com.cheng.bole.bean.UploadImgEntity>
|
||||
suspend fun upload(@Part part: MultipartBody.Part, @Query("scene") scene: String): HttpBaseResult<UploadFileEntity>
|
||||
|
||||
/**
|
||||
*删除用户文件
|
||||
|
|
@ -110,7 +120,7 @@ interface ApiService {
|
|||
* 联系客服
|
||||
*/
|
||||
@GET("/api/weixin/service")
|
||||
suspend fun wxService(): HttpBaseResult<com.cheng.bole.bean.WxServiceEntity>
|
||||
suspend fun wxService(): HttpBaseResult<WxServiceEntity>
|
||||
|
||||
/**
|
||||
* 事件上报
|
||||
|
|
@ -134,13 +144,13 @@ interface ApiService {
|
|||
* 获取VIP套餐列表
|
||||
*/
|
||||
@GET("/api/order/goods")
|
||||
suspend fun getGoodsList(@Query("type") type: String = "member"): HttpBaseResult<List<com.cheng.bole.bean.VipGoodsEntity>>
|
||||
suspend fun getGoodsList(@Query("type") type: String = "member"): HttpBaseResult<List<VipGoodsEntity>>
|
||||
|
||||
/**
|
||||
* 优惠券列表
|
||||
*/
|
||||
@GET("/api/activity/coupon")
|
||||
suspend fun couponList(@QueryMap params: Map<String, String>): HttpBaseResult<HttpListResult<com.cheng.bole.bean.CouponEntity>>
|
||||
suspend fun couponList(@QueryMap params: Map<String, String>): HttpBaseResult<HttpListResult<CouponEntity>>
|
||||
|
||||
/**
|
||||
* 获取优惠活动列表
|
||||
|
|
@ -158,7 +168,7 @@ interface ApiService {
|
|||
* 创建支付订单
|
||||
*/
|
||||
@POST("/api/order")
|
||||
suspend fun payCreateOrder(@Body requestBody: RequestBody): HttpBaseResult<com.cheng.bole.bean.OrderPayEntity>
|
||||
suspend fun payCreateOrder(@Body requestBody: RequestBody): HttpBaseResult<OrderPayEntity>
|
||||
|
||||
/**
|
||||
* 权限验证
|
||||
|
|
@ -245,7 +255,7 @@ interface ApiService {
|
|||
/**
|
||||
* 招标公告类型
|
||||
*/
|
||||
@GET("api/info/type")
|
||||
@GET("/api/info/type")
|
||||
suspend fun getBidTypeList(): HttpBaseResult<List<BidTypeBean>>
|
||||
|
||||
/**
|
||||
|
|
@ -330,7 +340,7 @@ interface ApiService {
|
|||
* 资质代办列表
|
||||
*/
|
||||
@GET("/api/agency/cert")
|
||||
suspend fun getAgencyList(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<QualificationInfoBean>>
|
||||
suspend fun getAgencyList(@QueryMap map: Map<String, String>): HttpBaseResult<HttpListResult<ZZDBInfoBean>>
|
||||
|
||||
/**
|
||||
* 我的标讯列表
|
||||
|
|
|
|||
|
|
@ -93,10 +93,10 @@ class AccountListDialog : DialogFragment() {
|
|||
class AccountAdapter: BaseQuickAdapter<com.cheng.bole.bean.AccountEntity, BaseViewHolder>(R.layout.listitem_account_login_tip) {
|
||||
override fun convert(holder: BaseViewHolder, item: com.cheng.bole.bean.AccountEntity) {
|
||||
if (item.vip_type == "1") {
|
||||
holder.setGone(R.id.tv_vip_tag, true)
|
||||
holder.setGone(R.id.iv_vip_tag, true)
|
||||
} else if (item.vip_type == "2" || item.vip_type == "3") {
|
||||
holder.setText(R.id.tv_vip_tag, if (item.vip_type == "2") "会员" else "终生会员")
|
||||
holder.setGone(R.id.tv_vip_tag, false)
|
||||
holder.setImageResource(R.id.iv_vip_tag, if (item.vip_type == "2") R.mipmap.ic_vip_tag1 else R.mipmap.ic_vip_tag2)
|
||||
holder.setGone(R.id.iv_vip_tag, false)
|
||||
}
|
||||
holder.setText(R.id.tv_username, item.name)
|
||||
holder.setText(R.id.tv_create_time, "${item.create_time} 注册")
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ object PopupDialog {
|
|||
}
|
||||
val selectedList = option.items.filter { item -> item.id != 0 }
|
||||
if (selectedList.isNotEmpty() && selectedList.all { item -> item.isChecked }) {
|
||||
option.isChecked = true
|
||||
option.items[0].isChecked = true
|
||||
}
|
||||
}
|
||||
|
|
@ -144,7 +143,12 @@ object PopupDialog {
|
|||
onDismiss.invoke()
|
||||
}
|
||||
|
||||
binding.btnReset.onClick { parentAdapter.setList(SearchOptionBean.getAreaOptionList()) }
|
||||
binding.btnReset.onClick {
|
||||
val optionList = SearchOptionBean.getAreaOptionList()
|
||||
optionList[0].isChecked = true
|
||||
parentAdapter.setList(optionList)
|
||||
childAdapter.setList(optionList[0].items)
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val list = mutableListOf<SearchOptionBean.OptionItem>()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,277 @@
|
|||
package com.cheng.bole.ui.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Dialog
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.databinding.DialogSelectAreaBinding
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import com.example.base.extensions.getColor
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.DensityUtils
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
|
||||
class SelectAreaDialog : DialogFragment() {
|
||||
private val isSingle by lazy { arguments?.getBoolean("isSingle") ?: false }
|
||||
private val showAll by lazy { arguments?.getBoolean("showAll") ?: false }
|
||||
|
||||
private var mOnBackListener: ((List<AreaBean>) -> Unit)? = null //回调事件
|
||||
|
||||
private lateinit var binding: DialogSelectAreaBinding
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
val window = dialog?.window
|
||||
val windowParams = window?.attributes
|
||||
windowParams?.dimAmount = 0.7f
|
||||
windowParams?.width = ScreenUtils.getWindowSize().x
|
||||
windowParams?.gravity = Gravity.BOTTOM
|
||||
windowParams?.windowAnimations = R.style.dialog_bottom
|
||||
dialog?.window?.attributes = windowParams
|
||||
}
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||
dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
|
||||
return super.onCreateView(inflater, container, savedInstanceState)
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||
val view = layoutInflater.inflate(R.layout.dialog_select_area, null)
|
||||
|
||||
binding = DialogSelectAreaBinding.bind(view)
|
||||
|
||||
val listStr = arguments?.getString("list")
|
||||
val defaultCityList = if (!TextUtils.isEmpty(listStr)) {
|
||||
Gson().fromJson(listStr, object : TypeToken<List<AreaBean>>() {}.type)
|
||||
} else emptyList<AreaBean>()
|
||||
|
||||
val areaAdapter = AreaAdapter()
|
||||
binding.rvParent.adapter = areaAdapter
|
||||
|
||||
val cityAdapter = CityAdapter()
|
||||
binding.rvChild.adapter = cityAdapter
|
||||
|
||||
val areaList = UserConfigManager.getAreaList()
|
||||
if (!isSingle) {
|
||||
areaList.add(0, AreaBean(0, name = "全国地区"))
|
||||
areaList.forEach { it.children.add(0, AreaBean(0, name = "全部")) }
|
||||
if (defaultCityList.size == UserConfigManager.getCityList().size) {
|
||||
areaList[0].isChecked = true
|
||||
areaList[0].children[0].isChecked = true
|
||||
} else {
|
||||
areaList.forEach { area ->
|
||||
area.children.forEach { child ->
|
||||
if (defaultCityList.find { city -> city.id == child.id } != null) {
|
||||
child.isChecked = true
|
||||
if (areaList.find { it.isChecked } == null) {
|
||||
area.isChecked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
val selectedList = area.children.filter { item -> item.id != 0 }
|
||||
if (selectedList.isNotEmpty() && selectedList.all { item -> item.isChecked }) {
|
||||
area.children[0].isChecked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (showAll) {
|
||||
areaList.add(0, AreaBean(0, name = "全国地区", children = mutableListOf(AreaBean(0, name = "全国"))))
|
||||
if (defaultCityList.isEmpty()) {
|
||||
areaList[0].isChecked = true
|
||||
areaList[0].children[0].isChecked = true
|
||||
}
|
||||
}
|
||||
if (!showAll || areaList.isNotEmpty()) {
|
||||
areaList.forEach { area ->
|
||||
area.children.forEach { child ->
|
||||
child.isChecked = defaultCityList.find { city -> city.id == child.id } != null
|
||||
if (areaList.find { it.isChecked } == null) {
|
||||
area.isChecked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (areaList.find { it.isChecked } == null) {
|
||||
areaList[0].isChecked = true
|
||||
}
|
||||
areaAdapter.setList(areaList)
|
||||
cityAdapter.setList(areaList.find { it.isChecked }?.children)
|
||||
|
||||
areaAdapter.setOnItemClickListener { _, _, position ->
|
||||
val item = areaAdapter.getItem(position)
|
||||
areaList.find { it.isChecked }?.isChecked = false
|
||||
item.isChecked = true
|
||||
areaAdapter.notifyDataSetChanged()
|
||||
|
||||
cityAdapter.setList(item.children)
|
||||
}
|
||||
|
||||
cityAdapter.setOnItemClickListener { _, _, position ->
|
||||
val item = cityAdapter.getItem(position)
|
||||
if (isSingle) {
|
||||
areaList.forEach { area ->
|
||||
area.children.find { it.isChecked }?.isChecked = false
|
||||
}
|
||||
item.isChecked = true
|
||||
} else {
|
||||
item.isChecked = !item.isChecked
|
||||
if (item.isChecked) {
|
||||
if (item.id == 0) {
|
||||
cityAdapter.data.forEach { it.isChecked = true }
|
||||
} else {
|
||||
if (cityAdapter.data.filter { it.id != 0 }.all { it.isChecked }) {
|
||||
cityAdapter.data[0].isChecked = true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (item.id == 0) {
|
||||
cityAdapter.data.forEach { it.isChecked = false }
|
||||
} else {
|
||||
if (cityAdapter.data[0].isChecked) {
|
||||
cityAdapter.data[0].isChecked = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (areaAdapter.data[0].isChecked) {
|
||||
for (i in 1 until areaAdapter.data.size) {
|
||||
areaAdapter.getItem(i).children.forEach {
|
||||
it.isChecked = false
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (areaAdapter.data[0].children[0].isChecked) {
|
||||
areaAdapter.data[0].children[0].isChecked = false
|
||||
}
|
||||
}
|
||||
}
|
||||
cityAdapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val selectedCityList = mutableListOf<AreaBean>()
|
||||
if (areaAdapter.data[0].children[0].id == 0 && areaAdapter.data[0].children[0].isChecked) {
|
||||
areaAdapter.data.forEach {
|
||||
selectedCityList.addAll(it.children.filter { item -> item.id != 0 })
|
||||
}
|
||||
} else {
|
||||
areaAdapter.data.forEach {
|
||||
selectedCityList.addAll(it.children.filter { item -> item.isChecked && item.id != 0 })
|
||||
}
|
||||
}
|
||||
if (selectedCityList.isEmpty()) {
|
||||
toast("请选择地区")
|
||||
return@onClick
|
||||
}
|
||||
mOnBackListener?.invoke(selectedCityList)
|
||||
dismiss()
|
||||
}
|
||||
|
||||
binding.ivClose.onClick { dismiss() }
|
||||
|
||||
val dialog = Dialog(requireContext())
|
||||
dialog.setContentView(view)
|
||||
return dialog
|
||||
}
|
||||
|
||||
fun setOnSelectListener(listener: ((List<AreaBean>) -> Unit)) {
|
||||
mOnBackListener = listener
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun newInstance(list: List<AreaBean> = emptyList(), isSingle: Boolean = false, showAll: Boolean = false): SelectAreaDialog {
|
||||
val arg = Bundle()
|
||||
arg.putString("list", Gson().toJson(list))
|
||||
arg.putBoolean("isSingle", isSingle)
|
||||
arg.putBoolean("showAll", showAll)
|
||||
val fragment = SelectAreaDialog()
|
||||
fragment.arguments = arg
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
class AreaAdapter() : BaseQuickAdapter<AreaBean, BaseViewHolder>(R.layout.listitem_search_option_parent) {
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
override fun convert(holder: BaseViewHolder, item: AreaBean) {
|
||||
holder.setText(R.id.tv_name, item.name)
|
||||
holder.setVisible(R.id.view_tag, item.isChecked)
|
||||
holder.itemView.setBackgroundColor(if (item.isChecked) Color.WHITE else Color.TRANSPARENT)
|
||||
/*holder.setText(R.id.tv_title, item.name)
|
||||
|
||||
val rvOptions = holder.getView<RecyclerView>(R.id.rv_options)
|
||||
if (rvOptions.adapter == null) {
|
||||
rvOptions.layoutManager = GridLayoutManager(context, 3)
|
||||
rvOptions.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(8f), DensityUtils.dp2px(8f)))
|
||||
val adapter = CityItemAdapter()
|
||||
rvOptions.adapter = adapter
|
||||
}
|
||||
val itemAdapter = rvOptions.adapter as CityItemAdapter
|
||||
itemAdapter.setList(item.children)
|
||||
itemAdapter.setOnItemClickListener { _, _, i ->
|
||||
val childItem = itemAdapter.getItem(i)
|
||||
if (!isSingle) {
|
||||
if (holder.layoutPosition == 0) {
|
||||
data.forEach {
|
||||
it.children.forEach { item -> item.isChecked = false }
|
||||
}
|
||||
childItem.isChecked = true
|
||||
notifyDataSetChanged()
|
||||
} else {
|
||||
childItem.isChecked = !childItem.isChecked
|
||||
if (childItem.id == 0) {
|
||||
item.children.forEach { item -> item.isChecked = childItem.isChecked }
|
||||
} else {
|
||||
if (!childItem.isChecked) {
|
||||
item.children[0].isChecked = false
|
||||
} else {
|
||||
if (item.children.filter { item -> item.isChecked }.size == item.children.size - 1) {
|
||||
item.children[0].isChecked = true
|
||||
}
|
||||
}
|
||||
}
|
||||
data[0].children[0].isChecked = false
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
} else {
|
||||
data.forEach {
|
||||
it.children.find { item -> item.isChecked }?.isChecked = false
|
||||
}
|
||||
childItem.isChecked = true
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
class CityAdapter : BaseQuickAdapter<AreaBean, BaseViewHolder>(R.layout.listitem_search_option_child) {
|
||||
override fun convert(holder: BaseViewHolder, item: AreaBean) {
|
||||
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_1a1a1a))
|
||||
holder.setVisible(R.id.iv_check, item.isChecked)
|
||||
holder.itemView.layoutParams.height = DensityUtils.dp2px(40f)
|
||||
holder.itemView.setPadding(DensityUtils.dp2px(30f), 0, DensityUtils.dp2px(25f), 0)
|
||||
/*holder.setText(R.id.tv_name, item.name)
|
||||
holder.setTextColor(R.id.tv_name, if (item.isChecked) getColor(R.color.color_ff493c) else getColor(R.color.color_1a1a1a))
|
||||
holder.getView<TextView>(R.id.tv_name).typeface = if (item.isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT
|
||||
|
||||
holder.itemView.setBackgroundResource(R.drawable.shape_f7f7f7_cor4)*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ import android.webkit.WebView
|
|||
import android.webkit.WebViewClient
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.BidDetailBean
|
||||
import com.cheng.bole.bean.UploadFileBean
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.bean.WxShareEntity
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.common.EventConstants
|
||||
|
|
@ -23,7 +23,6 @@ import com.cheng.bole.ui.dialog.DownloadAttachmentDialog
|
|||
import com.cheng.bole.utils.BidTypeUtils
|
||||
import com.example.base.browser.BrowserActivity
|
||||
import com.example.base.common.RxBus
|
||||
import com.example.base.extensions.getColor
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
|
|
@ -166,7 +165,7 @@ class BidDetailFragment: BaseFragment<FragmentBidDetailBinding, BidDetailViewMod
|
|||
binding.webView.visible()
|
||||
binding.rvImage.gone()
|
||||
} else {
|
||||
val imageList = Gson().fromJson<List<UploadFileBean>>(Gson().toJson(detail!!.origin_content), object : TypeToken<List<UploadFileBean>>() {}.type)
|
||||
val imageList = Gson().fromJson<List<UploadFileEntity>>(Gson().toJson(detail!!.origin_content), object : TypeToken<List<UploadFileEntity>>() {}.type)
|
||||
imageAdapter.setList(imageList)
|
||||
binding.rvImage.visible()
|
||||
binding.webView.gone()
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ import com.bumptech.glide.request.transition.Transition
|
|||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.UploadFileBean
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.utils.BitmapUtils
|
||||
|
||||
class BidImageAdapter: BaseQuickAdapter<UploadFileBean, BaseViewHolder>(R.layout.listitem_bid_detail_image) {
|
||||
override fun convert(holder: BaseViewHolder, item: UploadFileBean) {
|
||||
class BidImageAdapter: BaseQuickAdapter<UploadFileEntity, BaseViewHolder>(R.layout.listitem_bid_detail_image) {
|
||||
override fun convert(holder: BaseViewHolder, item: UploadFileEntity) {
|
||||
Glide.with(context)
|
||||
.asBitmap()
|
||||
.load(item.url)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.cheng.bole.ui.fragment.home
|
||||
|
||||
import android.text.TextUtils
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.recyclerview.widget.RecyclerView.HORIZONTAL
|
||||
import com.cheng.bole.R
|
||||
|
|
@ -10,9 +11,14 @@ import com.cheng.bole.common.EventConstants
|
|||
import com.cheng.bole.databinding.FragmentHomeBinding
|
||||
import com.cheng.bole.manager.EventReportManager
|
||||
import com.cheng.bole.manager.SearchHistoryManager
|
||||
import com.cheng.bole.manager.UserConfigManager
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.fragment.bid.BidAdapter
|
||||
import com.cheng.bole.ui.fragment.bid.detail.BidDetailFragment
|
||||
import com.cheng.bole.ui.fragment.home.bszz.BSZZFragment
|
||||
import com.cheng.bole.ui.fragment.home.dljz.DLJZFragment
|
||||
import com.cheng.bole.ui.fragment.home.qyzc.QYZCFragment
|
||||
import com.cheng.bole.ui.fragment.home.zzdb.ZZDBFragment
|
||||
import com.cheng.bole.ui.fragment.mine.vip.VipFragment
|
||||
import com.cheng.bole.ui.fragment.search.SearchFragment
|
||||
import com.cheng.bole.ui.fragment.search.list.SearchListFragment
|
||||
|
|
@ -50,7 +56,6 @@ class HomeFragment : ListFragment<FragmentHomeBinding, HomeViewModel, BidItemBea
|
|||
|
||||
binding.rvMenu.adapter = menuAdapter
|
||||
binding.rvMenu.addItemDecoration(GridSpaceItemDecoration(4, DensityUtils.dp2px(16f), 0))
|
||||
menuAdapter.setList(MenuEntity.getHomeMenu())
|
||||
|
||||
binding.rvHotKeyword.adapter = keywordAdapter
|
||||
binding.rvHotKeyword.addItemDecoration(SpacesItemDecoration(DensityUtils.dp2px(8f), HORIZONTAL))
|
||||
|
|
@ -58,6 +63,11 @@ class HomeFragment : ListFragment<FragmentHomeBinding, HomeViewModel, BidItemBea
|
|||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
if (UserConfigManager.getBidTypes().isEmpty()) {
|
||||
mViewModel.getBidTypeList()
|
||||
} else {
|
||||
menuAdapter.setList(MenuEntity.getHomeMenu())
|
||||
}
|
||||
mViewModel.getHotKeywordList("")
|
||||
firstLoad()
|
||||
}
|
||||
|
|
@ -83,22 +93,52 @@ class HomeFragment : ListFragment<FragmentHomeBinding, HomeViewModel, BidItemBea
|
|||
}
|
||||
}
|
||||
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
item = mAdapter.getItem(i)
|
||||
mViewModel.checkAuth()
|
||||
}
|
||||
}
|
||||
|
||||
keywordAdapter.setOnItemClickListener { _, _, i ->
|
||||
val item = keywordAdapter.getItem(i)
|
||||
PublicActivity.start(requireContext(), SearchListFragment::class.java,Pair("keyword", item))
|
||||
SearchHistoryManager.addHistory(item)
|
||||
}
|
||||
|
||||
menuAdapter.setOnItemClickListener { _, _, i ->
|
||||
val item = menuAdapter.getItem(i)
|
||||
when(item.id) {
|
||||
"dljz" -> {
|
||||
PublicActivity.start(requireContext(), DLJZFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_TOOLS, item.title)
|
||||
}
|
||||
"qyzc" -> {
|
||||
PublicActivity.start(requireContext(), QYZCFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_TOOLS, item.title)
|
||||
}
|
||||
"bszz" -> {
|
||||
PublicActivity.start(requireContext(), BSZZFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_TOOLS, item.title)
|
||||
}
|
||||
"zzdb" -> {
|
||||
PublicActivity.start(requireContext(), ZZDBFragment::class.java)
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_TOOLS, item.title)
|
||||
}
|
||||
else -> {
|
||||
PublicActivity.start(requireContext(), SearchListFragment::class.java, Pair("typeId", item.id))
|
||||
EventReportManager.eventReport(EventConstants.JUMP_TO_BID_SEARCH, item.title)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.typeLiveData.observe(this) {
|
||||
UserConfigManager.saveBidTypes(it)
|
||||
menuAdapter.setList(MenuEntity.getHomeMenu())
|
||||
}
|
||||
|
||||
mViewModel.recommendLiveData.observe(this) {
|
||||
keywordAdapter.setList(it)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.cheng.bole.ui.fragment.home
|
|||
import androidx.collection.ArrayMap
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.BidItemBean
|
||||
import com.cheng.bole.bean.BidTypeBean
|
||||
import com.cheng.bole.bean.UserAuthBean
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.net.model.toListResult
|
||||
|
|
@ -12,6 +13,8 @@ import com.example.base.viewmodel.ListViewModel
|
|||
|
||||
class HomeViewModel : ListViewModel<BidItemBean>() {
|
||||
val totalLiveData = MutableLiveData<String>()
|
||||
|
||||
val typeLiveData = MutableLiveData<List<BidTypeBean>>()
|
||||
val authLiveData = MutableLiveData<UserAuthBean>()
|
||||
val recommendLiveData = MutableLiveData<List<String>>()
|
||||
|
||||
|
|
@ -23,6 +26,21 @@ class HomeViewModel : ListViewModel<BidItemBean>() {
|
|||
return response.toListResult()
|
||||
}
|
||||
|
||||
fun getBidTypeList() {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.getBidTypeList()
|
||||
if (response.status) {
|
||||
typeLiveData.postValue(response.data)
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun getHotKeywordList(query: String) {
|
||||
launchOnUiTryCatch({
|
||||
val params = mutableMapOf<String, String>()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
package com.cheng.bole.ui.fragment.home.bszz
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.text.TextUtils
|
||||
import android.view.ViewTreeObserver
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.databinding.FragmentBszzBinding
|
||||
import com.cheng.bole.impl.TextWatcherImpl
|
||||
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
||||
import com.efs.sdk.memleaksdk.monitor.internal.bi
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.DensityUtils
|
||||
import com.example.base.utils.ScreenUtils
|
||||
import com.google.gson.JsonObject
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
|
||||
class BSZZFragment: BaseFragment<FragmentBszzBinding, BSZZViewModel>() {
|
||||
private var timestamp = ""
|
||||
|
||||
private var city: AreaBean? = null
|
||||
|
||||
private val textWatcher = object : TextWatcherImpl() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
super.onTextChanged(s, start, before, count)
|
||||
binding.tvTextCount.text = "${s?.length ?: 0}/300"
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.background = null
|
||||
setBackColor(R.color.white)
|
||||
|
||||
binding.layoutContent.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
val lp = binding.tvArea.layoutParams as ConstraintLayout.LayoutParams
|
||||
lp.topMargin = (ScreenUtils.getScreenWidth().toFloat() / DensityUtils.dp2px(375f) * DensityUtils.dp2px(410f)).toInt()
|
||||
binding.tvArea.layoutParams = lp
|
||||
binding.layoutContent.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.etDesc.addTextChangedListener(textWatcher)
|
||||
|
||||
binding.tvArea.onClick {
|
||||
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
||||
f.setOnSelectListener {
|
||||
city = it[0]
|
||||
binding.tvArea.text = city!!.name
|
||||
}
|
||||
f.show(childFragmentManager, SelectAreaDialog::class.java.simpleName)
|
||||
}
|
||||
|
||||
binding.tvSendCode.onClick {
|
||||
val phone = binding.etPhone.text.toString()
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入手机号")
|
||||
return@onClick
|
||||
}
|
||||
mViewModel.sendCode(phone)
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val name = binding.etName.text.toString().trim()
|
||||
val phone = binding.etPhone.text.toString().trim()
|
||||
val code = binding.etCode.text.toString().trim()
|
||||
val desc = binding.etDesc.text.toString().trim()
|
||||
if (city == null) {
|
||||
toast("请选择注册区域")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
toast("请输入姓名")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入电话")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
toast("请输入验证码")
|
||||
return@onClick
|
||||
}
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("source", "bid_book")
|
||||
jsonObject.addProperty("city", city!!.name)
|
||||
jsonObject.addProperty("cityId", "${city!!.id}")
|
||||
jsonObject.addProperty("name", name)
|
||||
jsonObject.addProperty("phone", phone)
|
||||
jsonObject.addProperty("code", code)
|
||||
jsonObject.addProperty("timestamp", timestamp)
|
||||
jsonObject.addProperty("remark", desc)
|
||||
mViewModel.addAgency(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.sendCodeLiveData.observe(this) { timestamp = it.timestamp }
|
||||
mViewModel.countTimeLiveEvent.observe(this) {
|
||||
if (it > 0) {
|
||||
binding.tvSendCode.text = "重新获取(${it}s)"
|
||||
binding.tvSendCode.isEnabled = false
|
||||
binding.tvSendCode.alpha = 0.5f
|
||||
} else {
|
||||
binding.tvSendCode.text = "重新获取"
|
||||
binding.tvSendCode.isEnabled = true
|
||||
binding.tvSendCode.alpha = 1f
|
||||
}
|
||||
}
|
||||
|
||||
mViewModel.addLiveData.observe(this) {
|
||||
toast("提交成功")
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
binding.etDesc.removeTextChangedListener(textWatcher)
|
||||
super.onDestroyView()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.cheng.bole.ui.fragment.home.bszz
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.SendCodeEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.common.RxCountDown
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import io.reactivex.rxjava3.disposables.Disposable
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class BSZZViewModel: BaseViewModel() {
|
||||
private var disposable: Disposable? = null
|
||||
|
||||
var sendCodeLiveData = MutableLiveData<SendCodeEntity>()
|
||||
val countTimeLiveEvent = MutableLiveData<Long>()
|
||||
val addLiveData = MutableLiveData<Any>()
|
||||
|
||||
fun sendCode(phone: String) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val map = HashMap<String, String>()
|
||||
map["phone"] = phone
|
||||
val response = ApiFactory.apiService.sendCode(map)
|
||||
if (response.status) {
|
||||
sendCodeLiveData.postValue(response.data)
|
||||
startTimer()
|
||||
} else {
|
||||
toast(response.message, true)
|
||||
}
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun addAgency(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.addAgency(requestBody)
|
||||
if (response.status) {
|
||||
addLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
private fun startTimer() {
|
||||
disposable?.dispose()
|
||||
disposable = RxCountDown.countdown(60).subscribe {
|
||||
countTimeLiveEvent.value = it
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
disposable?.dispose()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
package com.cheng.bole.ui.fragment.home.dljz
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.text.TextUtils
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.FragmentDljzBinding
|
||||
import com.cheng.bole.impl.TextWatcherImpl
|
||||
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.google.gson.JsonObject
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
|
||||
class DLJZFragment: BaseFragment<FragmentDljzBinding, DLJZViewModel>() {
|
||||
private var timestamp = ""
|
||||
|
||||
private var city: AreaBean? = null
|
||||
|
||||
private val textWatcher = object : TextWatcherImpl() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
super.onTextChanged(s, start, before, count)
|
||||
binding.tvTextCount.text = "${s?.length ?: 0}/300"
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.background = null
|
||||
|
||||
binding.tvTitle.typeface = Constants.almmsht
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.etDesc.addTextChangedListener(textWatcher)
|
||||
|
||||
binding.tvArea.onClick {
|
||||
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
||||
f.setOnSelectListener {
|
||||
city = it[0]
|
||||
binding.tvArea.text = city!!.name
|
||||
}
|
||||
f.show(childFragmentManager, SelectAreaDialog::class.java.simpleName)
|
||||
}
|
||||
|
||||
binding.tvSendCode.onClick {
|
||||
val phone = binding.etPhone.text.toString()
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入手机号")
|
||||
return@onClick
|
||||
}
|
||||
mViewModel.sendCode(phone)
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val name = binding.etName.text.toString().trim()
|
||||
val phone = binding.etPhone.text.toString().trim()
|
||||
val code = binding.etCode.text.toString().trim()
|
||||
val desc = binding.etDesc.text.toString().trim()
|
||||
if (city == null) {
|
||||
toast("请选择注册区域")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
toast("请输入姓名")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入电话")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
toast("请输入验证码")
|
||||
return@onClick
|
||||
}
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("source", "agency_charge")
|
||||
jsonObject.addProperty("city", city!!.name)
|
||||
jsonObject.addProperty("cityId", "${city!!.id}")
|
||||
jsonObject.addProperty("name", name)
|
||||
jsonObject.addProperty("phone", phone)
|
||||
jsonObject.addProperty("code", code)
|
||||
jsonObject.addProperty("timestamp", timestamp)
|
||||
jsonObject.addProperty("remark", desc)
|
||||
mViewModel.addAgency(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.sendCodeLiveData.observe(this) { timestamp = it.timestamp }
|
||||
mViewModel.countTimeLiveEvent.observe(this) {
|
||||
if (it > 0) {
|
||||
binding.tvSendCode.text = "重新获取(${it}s)"
|
||||
binding.tvSendCode.isEnabled = false
|
||||
binding.tvSendCode.alpha = 0.5f
|
||||
} else {
|
||||
binding.tvSendCode.text = "重新获取"
|
||||
binding.tvSendCode.isEnabled = true
|
||||
binding.tvSendCode.alpha = 1f
|
||||
}
|
||||
}
|
||||
|
||||
mViewModel.addLiveData.observe(this) {
|
||||
toast("提交成功")
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
binding.etDesc.removeTextChangedListener(textWatcher)
|
||||
super.onDestroyView()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.cheng.bole.ui.fragment.home.dljz
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.SendCodeEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.common.RxCountDown
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import io.reactivex.rxjava3.disposables.Disposable
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class DLJZViewModel : BaseViewModel() {
|
||||
private var disposable: Disposable? = null
|
||||
|
||||
var sendCodeLiveData = MutableLiveData<SendCodeEntity>()
|
||||
val countTimeLiveEvent = MutableLiveData<Long>()
|
||||
val addLiveData = MutableLiveData<Any>()
|
||||
|
||||
fun sendCode(phone: String) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val map = HashMap<String, String>()
|
||||
map["phone"] = phone
|
||||
val response = ApiFactory.apiService.sendCode(map)
|
||||
if (response.status) {
|
||||
sendCodeLiveData.postValue(response.data)
|
||||
startTimer()
|
||||
} else {
|
||||
toast(response.message, true)
|
||||
}
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun addAgency(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.addAgency(requestBody)
|
||||
if (response.status) {
|
||||
addLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
private fun startTimer() {
|
||||
disposable?.dispose()
|
||||
disposable = RxCountDown.countdown(60).subscribe {
|
||||
countTimeLiveEvent.value = it
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
disposable?.dispose()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.cheng.bole.ui.fragment.home.qyzc
|
||||
|
||||
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.bole.R
|
||||
import com.example.base.utils.DensityUtils
|
||||
|
||||
class QYZCCompanyAdapter(val context: Context, val data: MutableList<String>): RecyclerView.Adapter<BaseViewHolder>() {
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BaseViewHolder {
|
||||
val view = View.inflate(context, R.layout.listitem_qyzc_company, null)
|
||||
val lp = ConstraintLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, DensityUtils.dp2px(22f))
|
||||
lp.leftMargin = DensityUtils.dp2px(13f)
|
||||
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
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun getList(): List<String> {
|
||||
return listOf(
|
||||
"重庆做梦**科技有限公司",
|
||||
"重庆荣科**科技有限公司",
|
||||
"重庆高新**科技有限公司",
|
||||
"重庆中天**科技有限公司",
|
||||
"重庆太仓**科技有限公司",
|
||||
"重庆云维**科技有限公司",
|
||||
"重庆若晴**科技有限公司",
|
||||
"重庆东方**科技有限公司"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
package com.cheng.bole.ui.fragment.home.qyzc
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.text.TextUtils
|
||||
import android.view.ViewTreeObserver
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.databinding.FragmentQyzcBinding
|
||||
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
||||
import com.efs.sdk.memleaksdk.monitor.internal.bi
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.google.gson.JsonObject
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Observable
|
||||
import io.reactivex.rxjava3.disposables.Disposable
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class QYZCFragment : BaseFragment<FragmentQyzcBinding, QYZCViewModel>() {
|
||||
private var timestamp = ""
|
||||
|
||||
private var city: AreaBean? = null
|
||||
|
||||
private val companyAdapter by lazy { QYZCCompanyAdapter(requireContext(), companyList) }
|
||||
private val companyList = mutableListOf<String>()
|
||||
|
||||
private var scrollTask: Disposable? = null
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.background = null
|
||||
setBackColor(R.color.white)
|
||||
|
||||
binding.mTitleBar.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
(binding.rvCompany.layoutParams as ConstraintLayout.LayoutParams).topMargin = binding.mTitleBar.height
|
||||
binding.mTitleBar.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
companyList.addAll(QYZCCompanyAdapter.getList())
|
||||
binding.rvCompany.adapter = companyAdapter
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
|
||||
binding.tvArea.onClick {
|
||||
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
||||
f.setOnSelectListener {
|
||||
city = it[0]
|
||||
binding.tvArea.text = city!!.name
|
||||
}
|
||||
f.show(childFragmentManager, SelectAreaDialog::class.java.simpleName)
|
||||
}
|
||||
|
||||
binding.tvSendCode.onClick {
|
||||
val phone = binding.etPhone.text.toString()
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入手机号")
|
||||
return@onClick
|
||||
}
|
||||
mViewModel.sendCode(phone)
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val name = binding.etName.text.toString().trim()
|
||||
val phone = binding.etPhone.text.toString().trim()
|
||||
val code = binding.etCode.text.toString().trim()
|
||||
if (city == null) {
|
||||
toast("请选择注册区域")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
toast("请输入姓名")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入电话")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
toast("请输入验证码")
|
||||
return@onClick
|
||||
}
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("source", "company_register")
|
||||
jsonObject.addProperty("city", city!!.name)
|
||||
jsonObject.addProperty("cityId", "${city!!.id}")
|
||||
jsonObject.addProperty("name", name)
|
||||
jsonObject.addProperty("phone", phone)
|
||||
jsonObject.addProperty("code", code)
|
||||
jsonObject.addProperty("timestamp", timestamp)
|
||||
mViewModel.addAgency(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.sendCodeLiveData.observe(this) { timestamp = it.timestamp }
|
||||
mViewModel.countTimeLiveEvent.observe(this) {
|
||||
if (it > 0) {
|
||||
binding.tvSendCode.text = "重新获取(${it}s)"
|
||||
binding.tvSendCode.isEnabled = false
|
||||
binding.tvSendCode.alpha = 0.5f
|
||||
} else {
|
||||
binding.tvSendCode.text = "重新获取"
|
||||
binding.tvSendCode.isEnabled = true
|
||||
binding.tvSendCode.alpha = 1f
|
||||
}
|
||||
}
|
||||
|
||||
mViewModel.addLiveData.observe(this) {
|
||||
toast("提交成功")
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
private fun startScroll() {
|
||||
if (companyList.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()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.cheng.bole.ui.fragment.home.qyzc
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.SendCodeEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.common.RxCountDown
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import io.reactivex.rxjava3.disposables.Disposable
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class QYZCViewModel: BaseViewModel() {
|
||||
private var disposable: Disposable? = null
|
||||
|
||||
var sendCodeLiveData = MutableLiveData<SendCodeEntity>()
|
||||
val countTimeLiveEvent = MutableLiveData<Long>()
|
||||
val addLiveData = MutableLiveData<Any>()
|
||||
|
||||
fun sendCode(phone: String) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val map = HashMap<String, String>()
|
||||
map["phone"] = phone
|
||||
val response = ApiFactory.apiService.sendCode(map)
|
||||
if (response.status) {
|
||||
sendCodeLiveData.postValue(response.data)
|
||||
startTimer()
|
||||
} else {
|
||||
toast(response.message, true)
|
||||
}
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun addAgency(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.addAgency(requestBody)
|
||||
if (response.status) {
|
||||
addLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
private fun startTimer() {
|
||||
disposable?.dispose()
|
||||
disposable = RxCountDown.countdown(60).subscribe {
|
||||
countTimeLiveEvent.value = it
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
disposable?.dispose()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.cheng.bole.ui.fragment.home.zzdb
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.ZZDBInfoBean
|
||||
|
||||
class ZZDBAdapter: BaseQuickAdapter<ZZDBInfoBean, BaseViewHolder>(R.layout.listitem_zzdb_info) {
|
||||
override fun convert(holder: BaseViewHolder, item: ZZDBInfoBean) {
|
||||
holder.setText(R.id.tv_name, item.name)
|
||||
holder.setGone(R.id.tv_level1, true)
|
||||
holder.setGone(R.id.tv_level2, true)
|
||||
holder.setGone(R.id.tv_level3, true)
|
||||
item.children.forEach {
|
||||
when (it.level) {
|
||||
"1" -> {
|
||||
holder.setVisible(R.id.tv_level1, true)
|
||||
}
|
||||
"2" -> {
|
||||
holder.setVisible(R.id.tv_level2, true)
|
||||
}
|
||||
"3" -> {
|
||||
holder.setVisible(R.id.tv_level3, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.cheng.bole.ui.fragment.home.zzdb
|
||||
|
||||
import android.view.KeyEvent
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewOutlineProvider
|
||||
import android.view.ViewTreeObserver
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.databinding.FragmentZzdbBinding
|
||||
import com.cheng.bole.ui.activity.PublicActivity
|
||||
import com.cheng.bole.ui.fragment.home.zzdb.detail.ZZDBDetailFragment
|
||||
import com.example.base.extensions.getColor
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.widget.EmptyView
|
||||
import com.example.base.widget.PageStatus
|
||||
import eightbitlab.com.blurview.BlurView
|
||||
|
||||
class ZZDBFragment: BaseFragment<FragmentZzdbBinding, ZZDBViewModel>() {
|
||||
private val mAdapter by lazy { ZZDBAdapter() }
|
||||
private val mEmptyView by lazy { EmptyView(requireContext()) }
|
||||
|
||||
private var keyword = ""
|
||||
|
||||
private var page = 1
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
mTitleBar?.setBackgroundColor(getColor(R.color.windowBackground))
|
||||
mTitleBar?.background?.alpha = 0
|
||||
|
||||
binding.mRecyclerView.adapter = mAdapter
|
||||
mEmptyView.setNoDataLogo(R.mipmap.ic_empty_data)
|
||||
mAdapter.setEmptyView(mEmptyView)
|
||||
|
||||
binding.ivTopBg.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
(binding.layoutContent.layoutParams as ConstraintLayout.LayoutParams).topMargin = (binding.ivTopBg.height * 199f / 231f).toInt()
|
||||
binding.layoutContent.setupWith(binding.root).setFrameClearDrawable(binding.layoutContent.background).setBlurRadius(5f)
|
||||
binding.layoutContent.outlineProvider = ViewOutlineProvider.BACKGROUND
|
||||
binding.layoutContent.setClipToOutline(true)
|
||||
binding.ivTopBg.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
mViewModel.getAgencyList(page, "")
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.mRefreshLayout.setOnRefreshListener {
|
||||
page = 1
|
||||
mViewModel.getAgencyList(page, keyword)
|
||||
}
|
||||
|
||||
binding.mRefreshLayout.setOnLoadMoreListener {
|
||||
page++
|
||||
mViewModel.getAgencyList(page, keyword)
|
||||
}
|
||||
|
||||
binding.etSearch.setOnEditorActionListener { _, _, event ->
|
||||
if (event != null && event.keyCode == KeyEvent.KEYCODE_ENTER && event.action == KeyEvent.ACTION_DOWN) {
|
||||
page = 1
|
||||
keyword = binding.etSearch.text.toString().trim()
|
||||
mViewModel.getAgencyList(page, keyword)
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
mAdapter.setOnItemClickListener { _, _, i ->
|
||||
PublicActivity.start(requireContext(), ZZDBDetailFragment::class.java, Pair("item", mAdapter.getItem(i)))
|
||||
}
|
||||
|
||||
binding.nestedScrollView.setOnScrollChangeListener { _, _, scrollY, _, _ ->
|
||||
val offset = (binding.layoutContent.layoutParams as ConstraintLayout.LayoutParams).topMargin - binding.mTitleBar.height
|
||||
mTitleBar?.background?.alpha = ((scrollY / offset.toFloat()).coerceAtMost(1f) * 255f).toInt()
|
||||
}
|
||||
}
|
||||
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.listLiveData.observe(this) {
|
||||
if (page == 1) {
|
||||
mAdapter.setList(it)
|
||||
binding.mRefreshLayout.finishRefresh()
|
||||
} else {
|
||||
mAdapter.addData(it)
|
||||
binding.mRefreshLayout.finishLoadMore()
|
||||
}
|
||||
binding.mRefreshLayout.setNoMoreData(it.size < 20)
|
||||
|
||||
if (mAdapter.data.isNotEmpty()) {
|
||||
mEmptyView.setStatus(PageStatus.GONG)
|
||||
} else {
|
||||
mEmptyView.setStatus(PageStatus.NO_DATA)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.cheng.bole.ui.fragment.home.zzdb
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.ZZDBInfoBean
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
|
||||
class ZZDBViewModel: BaseViewModel() {
|
||||
val listLiveData = MutableLiveData<List<ZZDBInfoBean>>()
|
||||
|
||||
fun getAgencyList(page: Int, name: String) {
|
||||
launchOnUiTryCatch({
|
||||
val params = mutableMapOf<String, String>()
|
||||
params["page"] = "$page"
|
||||
params["size"] = "20"
|
||||
params["name"] = name
|
||||
val response = ApiFactory.apiService.getAgencyList(params)
|
||||
if (response.status) {
|
||||
listLiveData.postValue(response.data.items)
|
||||
} else toast(response.message, true)
|
||||
}, {
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
package com.cheng.bole.ui.fragment.home.zzdb.detail
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Build
|
||||
import android.text.TextUtils
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.AreaBean
|
||||
import com.cheng.bole.bean.ZZDBInfoBean
|
||||
import com.cheng.bole.databinding.FragmentZzdbDetailBinding
|
||||
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
||||
import com.example.base.extensions.gone
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.extensions.visible
|
||||
import com.example.base.ui.BaseFragment
|
||||
import com.example.base.utils.BarUtils
|
||||
import com.example.base.utils.DensityUtils
|
||||
import com.google.gson.JsonObject
|
||||
import com.gyf.immersionbar.ktx.actionBarHeight
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
|
||||
class ZZDBDetailFragment : BaseFragment<FragmentZzdbDetailBinding, ZZDBDetailViewModel>() {
|
||||
private var info: ZZDBInfoBean? = null
|
||||
private var childInfo: ZZDBInfoBean? = null
|
||||
|
||||
private val deviceAdapter by lazy { ZZDBDeviceAdapter() }
|
||||
|
||||
private var isExpand = false
|
||||
|
||||
private var timestamp = ""
|
||||
|
||||
private var city: AreaBean? = null
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
binding.rvDevice.adapter = deviceAdapter
|
||||
|
||||
(binding.layoutBaseInfo.layoutParams as ConstraintLayout.LayoutParams).topMargin = BarUtils.getStatusBarHeight() + actionBarHeight + DensityUtils.dp2px(12f)
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
super.initData()
|
||||
info = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||
arguments?.getSerializable("item", ZZDBInfoBean::class.java)
|
||||
} else {
|
||||
arguments?.getSerializable("item") as? ZZDBInfoBean
|
||||
}
|
||||
setBaseData()
|
||||
}
|
||||
|
||||
override fun initListener() {
|
||||
super.initListener()
|
||||
binding.tvMore.onClick {
|
||||
isExpand = !isExpand
|
||||
if (childInfo != null) {
|
||||
setExpandStyle(childInfo!!)
|
||||
}
|
||||
}
|
||||
|
||||
binding.rgLevel.setOnCheckedChangeListener { _, checkedId ->
|
||||
when (checkedId) {
|
||||
R.id.rb1 -> {
|
||||
childInfo = this.info!!.children.find { it.level == "1" }
|
||||
}
|
||||
|
||||
R.id.rb2 -> {
|
||||
childInfo = this.info!!.children.find { it.level == "2" }
|
||||
}
|
||||
|
||||
R.id.rb3 -> {
|
||||
childInfo = this.info!!.children.find { it.level == "3" }
|
||||
}
|
||||
}
|
||||
if (childInfo != null) {
|
||||
setDetailData(childInfo!!)
|
||||
}
|
||||
}
|
||||
|
||||
binding.tvArea.onClick {
|
||||
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
||||
f.setOnSelectListener {
|
||||
city = it[0]
|
||||
binding.tvArea.text = city!!.name
|
||||
}
|
||||
f.show(childFragmentManager, SelectAreaDialog::class.java.simpleName)
|
||||
}
|
||||
|
||||
binding.tvSendCode.onClick {
|
||||
val phone = binding.etPhone.text.toString()
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入手机号")
|
||||
return@onClick
|
||||
}
|
||||
mViewModel.sendCode(phone)
|
||||
}
|
||||
|
||||
binding.btnNext.onClick {
|
||||
val name = binding.etName.text.toString().trim()
|
||||
val phone = binding.etPhone.text.toString().trim()
|
||||
val code = binding.etCode.text.toString().trim()
|
||||
if (city == null) {
|
||||
toast("请选择注册区域")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(name)) {
|
||||
toast("请输入姓名")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(phone)) {
|
||||
toast("请输入电话")
|
||||
return@onClick
|
||||
}
|
||||
if (TextUtils.isEmpty(code)) {
|
||||
toast("请输入验证码")
|
||||
return@onClick
|
||||
}
|
||||
val jsonObject = JsonObject()
|
||||
jsonObject.addProperty("source", "agency_cert")
|
||||
jsonObject.addProperty("city", city!!.name)
|
||||
jsonObject.addProperty("cityId", "${city!!.id}")
|
||||
jsonObject.addProperty("name", name)
|
||||
jsonObject.addProperty("phone", phone)
|
||||
jsonObject.addProperty("code", code)
|
||||
jsonObject.addProperty("timestamp", timestamp)
|
||||
mViewModel.addAgency(jsonObject.toString().toRequestBody())
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun initObserve() {
|
||||
super.initObserve()
|
||||
mViewModel.sendCodeLiveData.observe(this) { timestamp = it.timestamp }
|
||||
mViewModel.countTimeLiveEvent.observe(this) {
|
||||
if (it > 0) {
|
||||
binding.tvSendCode.text = "重新获取(${it}s)"
|
||||
binding.tvSendCode.isEnabled = false
|
||||
binding.tvSendCode.alpha = 0.5f
|
||||
} else {
|
||||
binding.tvSendCode.text = "重新获取"
|
||||
binding.tvSendCode.isEnabled = true
|
||||
binding.tvSendCode.alpha = 1f
|
||||
}
|
||||
}
|
||||
|
||||
mViewModel.addLiveData.observe(this) {
|
||||
toast("提交成功")
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setBaseData() {
|
||||
if (info != null) {
|
||||
binding.tvName.text = info!!.name
|
||||
info!!.children.forEach {
|
||||
when (it.level) {
|
||||
"1" -> {
|
||||
binding.rb1.visible()
|
||||
binding.rb1.isChecked = true
|
||||
}
|
||||
|
||||
"2" -> {
|
||||
binding.rb2.visible()
|
||||
binding.rb2.isChecked = !binding.rb1.isChecked
|
||||
}
|
||||
|
||||
"3" -> {
|
||||
binding.rb3.visible()
|
||||
binding.rb2.isChecked = !binding.rb1.isChecked && !binding.rb2.isChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setDetailData(info: ZZDBInfoBean) {
|
||||
binding.tvRange.text = info.range
|
||||
binding.tvAsset.text = info.property
|
||||
binding.tvPerson.text = info.person
|
||||
binding.tvPerformance.text = info.performance
|
||||
|
||||
if (!TextUtils.isEmpty(info.equitment)) {
|
||||
if (info.equitment.startsWith("具有下列机械设备:")) {
|
||||
val deviceArray = info.equitment.split("\r\n\r\n")
|
||||
val deviceList = mutableListOf<String>()
|
||||
deviceArray.forEach {
|
||||
if (it.startsWith("(") && it.indexOf(")") != -1) {
|
||||
deviceList.add(it.substring(it.indexOf(")") + 1, it.length - 1))
|
||||
}
|
||||
}
|
||||
deviceAdapter.setList(deviceList)
|
||||
} else {
|
||||
deviceAdapter.setList(listOf(info.equitment))
|
||||
}
|
||||
}
|
||||
|
||||
setExpandStyle(info)
|
||||
}
|
||||
|
||||
private fun setExpandStyle(info: ZZDBInfoBean) {
|
||||
if (isExpand) {
|
||||
binding.tvMore.text = "收起更多资质说明"
|
||||
binding.tvMore.setCompoundDrawablesWithIntrinsicBounds(0 , 0, R.mipmap.ic_more_arrow_up, 0)
|
||||
binding.layoutAsset.visible()
|
||||
binding.layoutPerson.visible()
|
||||
if (!TextUtils.isEmpty(info.performance)) {
|
||||
binding.layoutPerformance.visible()
|
||||
} else {
|
||||
binding.layoutPerformance.gone()
|
||||
}
|
||||
if (!TextUtils.isEmpty(info.equitment)) {
|
||||
binding.layoutDevice.visible()
|
||||
} else {
|
||||
binding.layoutDevice.gone()
|
||||
}
|
||||
} else {
|
||||
binding.tvMore.text = "展开更多资质说明"
|
||||
binding.tvMore.setCompoundDrawablesWithIntrinsicBounds(0 , 0, R.mipmap.ic_more_arrow_down, 0)
|
||||
binding.layoutAsset.gone()
|
||||
binding.layoutPerson.gone()
|
||||
binding.layoutPerformance.gone()
|
||||
binding.layoutDevice.gone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.cheng.bole.ui.fragment.home.zzdb.detail
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.SendCodeEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.example.base.common.RxCountDown
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import io.reactivex.rxjava3.disposables.Disposable
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class ZZDBDetailViewModel: BaseViewModel() {
|
||||
private var disposable: Disposable? = null
|
||||
|
||||
var sendCodeLiveData = MutableLiveData<SendCodeEntity>()
|
||||
val countTimeLiveEvent = MutableLiveData<Long>()
|
||||
val addLiveData = MutableLiveData<Any>()
|
||||
|
||||
fun sendCode(phone: String) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val map = HashMap<String, String>()
|
||||
map["phone"] = phone
|
||||
val response = ApiFactory.apiService.sendCode(map)
|
||||
if (response.status) {
|
||||
sendCodeLiveData.postValue(response.data)
|
||||
startTimer()
|
||||
} else {
|
||||
toast(response.message, true)
|
||||
}
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
fun addAgency(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.addAgency(requestBody)
|
||||
if (response.status) {
|
||||
addLiveData.postValue(Any())
|
||||
} else toast(response.message, true)
|
||||
dismissDialog()
|
||||
}, {
|
||||
dismissDialog()
|
||||
setError(it)
|
||||
L.d(it)
|
||||
})
|
||||
}
|
||||
|
||||
private fun startTimer() {
|
||||
disposable?.dispose()
|
||||
disposable = RxCountDown.countdown(60).subscribe {
|
||||
countTimeLiveEvent.value = it
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
disposable?.dispose()
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.cheng.bole.ui.fragment.home.zzdb.detail
|
||||
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.cheng.bole.R
|
||||
|
||||
class ZZDBDeviceAdapter: BaseQuickAdapter<String, BaseViewHolder>(R.layout.listitem_zzdb_device) {
|
||||
override fun convert(holder: BaseViewHolder, item: String) {
|
||||
holder.setText(R.id.tv_index, "${holder.layoutPosition + 1}")
|
||||
holder.setText(R.id.tv_desc, item)
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,12 @@ import android.text.Editable
|
|||
import android.text.TextUtils
|
||||
import android.text.TextWatcher
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.FragmentFeedbackBinding
|
||||
import com.cheng.bole.ui.fragment.photo.AddImageAdapter
|
||||
import com.cheng.bole.utils.PermissionUtils
|
||||
import com.example.base.extensions.onClick
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.ui.BaseFragment
|
||||
|
|
@ -13,11 +19,6 @@ import com.google.gson.JsonObject
|
|||
import com.huantansheng.easyphotos.EasyPhotos
|
||||
import com.huantansheng.easyphotos.callback.SelectCallback
|
||||
import com.huantansheng.easyphotos.models.album.entity.Photo
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.FragmentFeedbackBinding
|
||||
import com.cheng.bole.ui.fragment.photo.AddImageAdapter
|
||||
import com.cheng.bole.utils.PermissionUtils
|
||||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
|
||||
class FeedbackFragment : BaseFragment<FragmentFeedbackBinding, FeedbackViewModel>() {
|
||||
|
|
@ -25,8 +26,8 @@ class FeedbackFragment : BaseFragment<FragmentFeedbackBinding, FeedbackViewModel
|
|||
|
||||
private val imageAdapter by lazy { AddImageAdapter(requireContext(), selectedPhotoList) }
|
||||
private var selectedPhotoList: ArrayList<Photo> = ArrayList()
|
||||
private var selectImg: ArrayList<com.cheng.bole.bean.UploadImgEntity> = ArrayList()
|
||||
private var deletedImg: ArrayList<com.cheng.bole.bean.UploadImgEntity> = ArrayList()
|
||||
private var selectImg: ArrayList<UploadFileEntity> = ArrayList()
|
||||
private var deletedImg: ArrayList<UploadFileEntity> = ArrayList()
|
||||
|
||||
companion object {
|
||||
const val TYPE_SUGGESTION = 0
|
||||
|
|
|
|||
|
|
@ -2,20 +2,21 @@ package com.cheng.bole.ui.fragment.mine.feedback
|
|||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.utils.BitmapUtils
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import com.huantansheng.easyphotos.models.album.entity.Photo
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.utils.BitmapUtils
|
||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class FeedbackViewModel : BaseViewModel() {
|
||||
val feedbackLiveData = MutableLiveData<Any>()
|
||||
val uploadSuccessLiveData = MutableLiveData<List<com.cheng.bole.bean.UploadImgEntity>>()
|
||||
val imgList = ArrayList<com.cheng.bole.bean.UploadImgEntity>()
|
||||
val uploadSuccessLiveData = MutableLiveData<List<UploadFileEntity>>()
|
||||
val imgList = ArrayList<UploadFileEntity>()
|
||||
|
||||
fun feedback(requestBody: RequestBody) {
|
||||
showDialog()
|
||||
|
|
@ -31,12 +32,12 @@ class FeedbackViewModel : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
fun delete(list: ArrayList<com.cheng.bole.bean.UploadImgEntity>) {
|
||||
fun delete(list: ArrayList<UploadFileEntity>) {
|
||||
list.forEachIndexed { index, photo ->
|
||||
if (index == 0) {
|
||||
delStoreImg(photo) {
|
||||
list.remove(photo)
|
||||
if (list.size > 0) {
|
||||
if (list.isNotEmpty()) {
|
||||
delete(list)
|
||||
}
|
||||
}
|
||||
|
|
@ -45,7 +46,7 @@ class FeedbackViewModel : BaseViewModel() {
|
|||
}
|
||||
|
||||
//删除文件
|
||||
fun delStoreImg(img: com.cheng.bole.bean.UploadImgEntity, delBack: (() -> Unit)?) {
|
||||
fun delStoreImg(img: UploadFileEntity, delBack: (() -> Unit)?) {
|
||||
showDialog()
|
||||
launchOnUiTryCatch({
|
||||
val response = ApiFactory.apiService.delUserFile(img.id)
|
||||
|
|
@ -65,7 +66,7 @@ class FeedbackViewModel : BaseViewModel() {
|
|||
if (index == 0) {
|
||||
uploadImg(context, photo) {
|
||||
list.remove(photo)
|
||||
if (list.size > 0) {
|
||||
if (list.isNotEmpty()) {
|
||||
upload(context, list)
|
||||
} else {
|
||||
uploadSuccessLiveData.postValue(imgList)
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ import com.huantansheng.easyphotos.EasyPhotos
|
|||
import com.huantansheng.easyphotos.callback.SelectCallback
|
||||
import com.huantansheng.easyphotos.models.album.entity.Photo
|
||||
import com.cheng.bole.R
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.bean.UserEntity
|
||||
import com.cheng.bole.common.Constants
|
||||
import com.cheng.bole.databinding.FragmentUserSettingBinding
|
||||
import com.cheng.bole.event.UserInfoEvent
|
||||
|
|
@ -22,9 +24,9 @@ import com.cheng.bole.utils.PermissionUtils
|
|||
import okhttp3.RequestBody.Companion.toRequestBody
|
||||
|
||||
class UserSettingFragment : BaseFragment<FragmentUserSettingBinding, UserSettingViewModel>() {
|
||||
private var userInfo: com.cheng.bole.bean.UserEntity? = null
|
||||
private var userInfo: UserEntity? = null
|
||||
private var selectedPhoto: Photo? = null
|
||||
private var selectedImg: com.cheng.bole.bean.UploadImgEntity? = null
|
||||
private var selectedImg: UploadFileEntity? = null
|
||||
|
||||
override fun initView() {
|
||||
super.initView()
|
||||
|
|
|
|||
|
|
@ -2,19 +2,21 @@ package com.cheng.bole.ui.fragment.mine.user
|
|||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.cheng.bole.bean.UploadFileEntity
|
||||
import com.cheng.bole.bean.UserEntity
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.utils.BitmapUtils
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import com.example.base.viewmodel.BaseViewModel
|
||||
import com.huantansheng.easyphotos.models.album.entity.Photo
|
||||
import com.cheng.bole.net.ApiFactory
|
||||
import com.cheng.bole.utils.BitmapUtils
|
||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
|
||||
class UserSettingViewModel : BaseViewModel() {
|
||||
val userInfoLiveData = MutableLiveData<com.cheng.bole.bean.UserEntity>()
|
||||
val uploadImgLiveData = MutableLiveData<com.cheng.bole.bean.UploadImgEntity>()
|
||||
val userInfoLiveData = MutableLiveData<UserEntity>()
|
||||
val uploadImgLiveData = MutableLiveData<UploadFileEntity>()
|
||||
val uploadUserinfoLiveData = MutableLiveData<Any>()
|
||||
val deleteImageLiveData = MutableLiveData<String>()
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ class SearchListFragment : ListFragment<FragmentSearchListBinding, SearchListVie
|
|||
binding.btnType.setTextColor(getColor(R.color.color_1a1a1a))
|
||||
binding.btnType.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.mipmap.ic_option_arrow_down, 0)
|
||||
}, {
|
||||
typeList.clear()
|
||||
typeList.addAll(it)
|
||||
mViewModel.params["typeId"] = it.map { item -> item.id }.joinToString(",")
|
||||
firstLoad()
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import android.graphics.Color
|
|||
object BidTypeUtils {
|
||||
fun getShortName(typeName: String): String {
|
||||
return when (typeName) {
|
||||
"招标计划" -> "招标"
|
||||
"招标公告" -> "招标"
|
||||
"招标计划" -> "预告"
|
||||
"采购公告" -> "采购"
|
||||
"招标公告" -> "预告"
|
||||
"合同公告" -> "合同"
|
||||
"中标公告" -> "中标"
|
||||
"竞争性磋商" -> "竞争性磋商"
|
||||
|
|
@ -19,9 +19,9 @@ object BidTypeUtils {
|
|||
|
||||
fun getTypeColor(typeName: String): Int {
|
||||
return when (typeName) {
|
||||
"招标计划" -> Color.parseColor("#2B88F9")
|
||||
"招标公告" -> Color.parseColor("#2B88F9")
|
||||
"招标计划" -> Color.parseColor("#14CEB3")
|
||||
"采购公告" -> Color.parseColor("#FF7344")
|
||||
"招标公告" -> Color.parseColor("#14CEB3")
|
||||
"合同公告" -> Color.parseColor("#FFA91D")
|
||||
"中标公告" -> Color.parseColor("#FF1B1B")
|
||||
"竞争性磋商" -> Color.parseColor("#0DA9FF")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,403 @@
|
|||
package com.cheng.bole.utils
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.ContentResolver
|
||||
import android.content.ContentUris
|
||||
import android.content.Context
|
||||
import android.database.Cursor
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Environment
|
||||
import android.os.FileUtils
|
||||
import android.os.StatFs
|
||||
import android.provider.DocumentsContract
|
||||
import android.provider.MediaStore
|
||||
import android.provider.OpenableColumns
|
||||
import android.text.TextUtils
|
||||
import androidx.annotation.RequiresApi
|
||||
import com.example.base.extensions.toast
|
||||
import com.example.base.utils.L
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
|
||||
object FileProviderUtils {
|
||||
//文件夹的名称
|
||||
private const val dirName = "UploadFile"
|
||||
|
||||
/**
|
||||
* 根据Uri获取文件绝对路径,解决Android4.4以上版本Uri转换 兼容Android 10
|
||||
*
|
||||
* @param context
|
||||
* @param uri
|
||||
* @param fileName 自定义沙盒的文件名,避免沙盒中同名的情况,另外要注意的一点是沙盒中的文件记得要删除
|
||||
*/
|
||||
fun getFileAbsolutePath(context: Context, uri: Uri, fileName: String = ""): String? {
|
||||
//大于等于Android 19,小于Android 29
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q && DocumentsContract.isDocumentUri(context, uri)) {
|
||||
if (isExternalStorageDocument(uri)) {
|
||||
val docId: String = DocumentsContract.getDocumentId(uri)
|
||||
val split = docId.split(":")
|
||||
val type = split[0]
|
||||
if ("primary" == type) {
|
||||
return "${Environment.getExternalStorageDirectory()}/${split[1]}"
|
||||
}
|
||||
} else if (isDownloadsDocument(uri)) {
|
||||
val id = DocumentsContract.getDocumentId(uri)
|
||||
return if (!TextUtils.isEmpty(id)) {
|
||||
if (id.startsWith("raw:")) {
|
||||
id.replaceFirst("raw:", "")
|
||||
} else {
|
||||
try {
|
||||
getContentPath(context, id)
|
||||
} catch (exception: NumberFormatException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
} else {
|
||||
null
|
||||
}
|
||||
} else if (isMediaDocument(uri)) {
|
||||
val docId = DocumentsContract.getDocumentId(uri)
|
||||
val split = docId.split(":")
|
||||
val type = split[0]
|
||||
var contentUri: Uri? = null
|
||||
when (type) {
|
||||
"image" -> {
|
||||
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI
|
||||
}
|
||||
|
||||
"video" -> {
|
||||
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI
|
||||
}
|
||||
|
||||
"audio" -> {
|
||||
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
val selection = "${MediaStore.Images.Media._ID}=?"
|
||||
val selectionArgs = arrayOf(split[1])
|
||||
return getDataColumn(context, contentUri, selection, selectionArgs);
|
||||
}
|
||||
}
|
||||
|
||||
// MediaStore (and general)
|
||||
//大于Android 29
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
return if (fileName.isNotEmpty()) {
|
||||
uriToFileApiQCustomFileName(context, uri, fileName)
|
||||
} else {
|
||||
uriToFileApiQ(context, uri)
|
||||
}
|
||||
} else if ("content" == uri.scheme) {
|
||||
// Return the remote address
|
||||
if (isGooglePhotosUri(uri)) {
|
||||
return uri.lastPathSegment;
|
||||
}
|
||||
return getDataColumn(context, uri, null, null);
|
||||
}
|
||||
// File
|
||||
else if ("file" == uri.scheme) {
|
||||
return uri.path
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取download文件夹存储内容的路径
|
||||
*/
|
||||
private fun getContentPath(context: Context, id: String): String? {
|
||||
val contentUriPrefixesToTry = arrayOf(
|
||||
"content://downloads/public_downloads",
|
||||
"content://downloads/my_downloads",
|
||||
"content://downloads/all_downloads"
|
||||
)
|
||||
|
||||
for (contentUriPrefix in contentUriPrefixesToTry) {
|
||||
val contentUri =
|
||||
ContentUris.withAppendedId(Uri.parse(contentUriPrefix), id.toLong())
|
||||
try {
|
||||
val path = getDataColumn(context, contentUri, null, null)
|
||||
if (path != null) {
|
||||
return path
|
||||
}
|
||||
} catch (_: java.lang.Exception) {
|
||||
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* @param uri The Uri to check.
|
||||
* @return Whether the Uri authority is ExternalStorageProvider.
|
||||
*/
|
||||
private fun isExternalStorageDocument(uri: Uri): Boolean {
|
||||
return "com.android.externalstorage.documents" == uri.authority
|
||||
}
|
||||
|
||||
/**
|
||||
* @param uri The Uri to check.
|
||||
* @return Whether the Uri authority is DownloadsProvider.
|
||||
*/
|
||||
private fun isDownloadsDocument(uri: Uri): Boolean {
|
||||
return "com.android.providers.downloads.documents" == uri.authority
|
||||
}
|
||||
|
||||
private fun getDataColumn(
|
||||
context: Context,
|
||||
uri: Uri?,
|
||||
selection: String?,
|
||||
selectionArgs: Array<String>?
|
||||
): String? {
|
||||
var cursor: Cursor? = null
|
||||
val column: String = MediaStore.Images.Media.DATA
|
||||
val projection = arrayOf(column)
|
||||
if (uri != null) {
|
||||
try {
|
||||
cursor =
|
||||
context.contentResolver.query(uri, projection, selection, selectionArgs, null)
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
val index: Int = cursor.getColumnIndexOrThrow(column)
|
||||
return cursor.getString(index);
|
||||
}
|
||||
} catch (exception: IllegalArgumentException) {
|
||||
return getFilePathFromURI(context, uri)
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件路径
|
||||
*/
|
||||
private fun getFilePathFromURI(context: Context, uri: Uri): String? {
|
||||
val fileName = getFileName(uri)
|
||||
if (!TextUtils.isEmpty(fileName)) {
|
||||
val copyFile = File(context.cacheDir, fileName!!)
|
||||
copyCacheFile(context, uri, copyFile)
|
||||
return copyFile.absolutePath
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件名
|
||||
*/
|
||||
private fun getFileName(uri: Uri): String? {
|
||||
var fileName: String? = null
|
||||
uri.path?.let { path ->
|
||||
path.lastIndexOf('/').also {
|
||||
if (it != -1) {
|
||||
fileName = path.substring(it + 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
return fileName
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制文件
|
||||
*/
|
||||
private fun copyCacheFile(context: Context, uri: Uri, copyFile: File) {
|
||||
try {
|
||||
val inputStream = context.contentResolver.openInputStream(uri)
|
||||
val outputStream = FileOutputStream(copyFile)
|
||||
val buffer = ByteArray(1024)
|
||||
var length: Int
|
||||
|
||||
if (inputStream != null) {
|
||||
while (inputStream.read(buffer).also { length = it } > 0) {
|
||||
outputStream.write(buffer, 0, length)
|
||||
}
|
||||
outputStream.flush()
|
||||
inputStream.close()
|
||||
outputStream.close()
|
||||
}
|
||||
} catch (exception: IOException) {
|
||||
L.e(exception.message)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param uri The Uri to check.
|
||||
* @return Whether the Uri authority is MediaProvider.
|
||||
*/
|
||||
private fun isMediaDocument(uri: Uri): Boolean {
|
||||
return "com.android.providers.media.documents" == uri.authority
|
||||
}
|
||||
|
||||
/**
|
||||
* @param uri The Uri to check.
|
||||
* @return Whether the Uri authority is Google Photos.
|
||||
*/
|
||||
private fun isGooglePhotosUri(uri: Uri): Boolean {
|
||||
return "com.google.android.apps.photos.content" == uri.authority
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Android 10 以上适配 另一种写法
|
||||
* @param context
|
||||
* @param uri
|
||||
* @return
|
||||
*/
|
||||
@SuppressLint("Range")
|
||||
private fun getFileFromContentUri(context: Context, uri: Uri): String? {
|
||||
val filePath: String?
|
||||
val filePathColumn =
|
||||
arrayOf(MediaStore.MediaColumns.DATA, MediaStore.MediaColumns.DISPLAY_NAME)
|
||||
val contentResolver: ContentResolver = context.contentResolver
|
||||
val cursor: Cursor? = contentResolver.query(
|
||||
uri, filePathColumn, null,
|
||||
null, null
|
||||
)
|
||||
if (cursor != null) {
|
||||
cursor.moveToFirst()
|
||||
try {
|
||||
filePath = cursor.getString(cursor.getColumnIndex(filePathColumn[0]))
|
||||
return filePath
|
||||
} catch (e: Exception) {
|
||||
L.d(e.message)
|
||||
} finally {
|
||||
cursor.close()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
/**
|
||||
* Android 10 以上适配
|
||||
* @param context
|
||||
* @param uri
|
||||
* @return
|
||||
*/
|
||||
@SuppressLint("Range")
|
||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||
private fun uriToFileApiQ(context: Context, uri: Uri): String? {
|
||||
var file: File? = null
|
||||
//android10以上转换
|
||||
if (uri.scheme.equals(ContentResolver.SCHEME_FILE)) {
|
||||
file = File(uri.path!!)
|
||||
} else if (uri.scheme.equals(ContentResolver.SCHEME_CONTENT)) {
|
||||
val contentResolver: ContentResolver = context.contentResolver
|
||||
val cursor: Cursor? = contentResolver.query(uri, null, null, null, null)
|
||||
try {
|
||||
//把文件复制到沙盒目录
|
||||
if (cursor != null) {
|
||||
if (cursor.moveToFirst()) {
|
||||
//通过Cursor获取真实的文件名
|
||||
val displayName: String = cursor.getString(
|
||||
cursor.getColumnIndex(
|
||||
OpenableColumns.DISPLAY_NAME
|
||||
)
|
||||
)
|
||||
val fileSize = cursor.getLong(cursor.getColumnIndex(OpenableColumns.SIZE))
|
||||
//判断存储空间是否足够
|
||||
if (getRemainingStorageSpace() <= fileSize) {
|
||||
toast("空间不足")
|
||||
return null
|
||||
}
|
||||
|
||||
val inputStream: InputStream? = contentResolver.openInputStream(uri)
|
||||
//在沙盒中存储也是用的真实的文件名
|
||||
val pathFile = File(context.getExternalFilesDir(null), dirName)
|
||||
if (!pathFile.exists()) {
|
||||
pathFile.mkdir()
|
||||
}
|
||||
val cache = File(pathFile, displayName)
|
||||
val fos = FileOutputStream(cache)
|
||||
if (inputStream != null) {
|
||||
FileUtils.copy(inputStream, fos)
|
||||
}
|
||||
file = cache
|
||||
fos.close()
|
||||
inputStream?.close()
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
|
||||
}
|
||||
return file?.absolutePath
|
||||
}
|
||||
|
||||
/**
|
||||
* Android 10 以上适配
|
||||
* @param context
|
||||
* @param uri
|
||||
* @return
|
||||
*/
|
||||
@SuppressLint("Range")
|
||||
@RequiresApi(api = Build.VERSION_CODES.Q)
|
||||
private fun uriToFileApiQCustomFileName(context: Context, uri: Uri, fileName: String): String? {
|
||||
var file: File? = null
|
||||
//android10以上转换
|
||||
if (uri.scheme.equals(ContentResolver.SCHEME_FILE)) {
|
||||
file = File(uri.path!!)
|
||||
} else if (uri.scheme.equals(ContentResolver.SCHEME_CONTENT)) {
|
||||
//把文件复制到沙盒目录
|
||||
val contentResolver: ContentResolver = context.contentResolver
|
||||
val cursor: Cursor? = contentResolver.query(uri, null, null, null, null)
|
||||
try {
|
||||
if (cursor != null) {
|
||||
if (cursor.moveToFirst()) {
|
||||
val fileSize = cursor.getLong(cursor.getColumnIndex(OpenableColumns.SIZE))
|
||||
//判断存储空间是否足够
|
||||
if (getRemainingStorageSpace() <= fileSize) {
|
||||
toast("空间不足")
|
||||
return null
|
||||
}
|
||||
|
||||
val inputStream: InputStream? = contentResolver.openInputStream(uri)
|
||||
val pathFile = File(context.getExternalFilesDir(null), dirName)
|
||||
if (!pathFile.exists()) {
|
||||
pathFile.mkdirs()
|
||||
}
|
||||
val cache = File(pathFile, fileName)
|
||||
val fos = FileOutputStream(cache)
|
||||
if (inputStream != null) {
|
||||
FileUtils.copy(inputStream, fos)
|
||||
}
|
||||
file = cache
|
||||
fos.close()
|
||||
inputStream?.close()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
cursor?.close()
|
||||
}
|
||||
}
|
||||
return file?.absolutePath
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取剩余的存储空间
|
||||
*/
|
||||
private fun getRemainingStorageSpace(): Long {
|
||||
runCatching {
|
||||
val iPath: File = Environment.getDataDirectory()
|
||||
val iStat = StatFs(iPath.path)
|
||||
val iBlockSize = iStat.blockSizeLong
|
||||
val iAvailableBlocks = iStat.availableBlocksLong
|
||||
iAvailableBlocks * iBlockSize
|
||||
}.onSuccess {
|
||||
return it
|
||||
}.onFailure {
|
||||
return 0
|
||||
}
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@mipmap/ic_zzdb_type_tab_checked" android:state_checked="true" />
|
||||
<item android:drawable="@drawable/shape_trans_bg" android:state_checked="false" />
|
||||
</selector>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/white" android:state_checked="true" />
|
||||
<item android:color="@color/color_1a1a1a" android:state_checked="false" />
|
||||
</selector>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_16"/>
|
||||
<solid android:color="@color/color_2a80fc"/>
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_16" />
|
||||
<solid android:color="#C3E7FF" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="0.5dp" android:color="@color/color_cccccc"/>
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:top="@dimen/dp_120">
|
||||
<color android:color="#FFE588"/>
|
||||
</item>
|
||||
<item android:height="@dimen/dp_120">
|
||||
<shape>
|
||||
<corners android:topRightRadius="@dimen/dp_60"/>
|
||||
<gradient android:startColor="#FEF2C2" android:endColor="@color/transparent" android:angle="270"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:top="@dimen/dp_60" android:bottom="@dimen/dp_48">
|
||||
<shape>
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_30"
|
||||
android:bottomRightRadius="@dimen/dp_30"
|
||||
android:topRightRadius="@dimen/dp_50" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<size
|
||||
android:width="@dimen/dp_10"
|
||||
android:height="@dimen/dp_50" />
|
||||
<corners
|
||||
android:bottomRightRadius="@dimen/dp_6"
|
||||
android:topRightRadius="@dimen/dp_6" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#FF7C31"
|
||||
android:startColor="#FFB517" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
<stroke
|
||||
android:width="@dimen/dp_1"
|
||||
android:color="@color/color_ebebeb" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#EFF8FD" />
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<stroke android:width="@dimen/dp_1" android:color="@color/white"/>
|
||||
<corners android:radius="@dimen/dp_25"/>
|
||||
<solid android:color="#4d000000"/>
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/transparent" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/transparent" />
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/dp_20"
|
||||
android:topRightRadius="@dimen/dp_20" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:bottomLeftRadius="@dimen/dp_16"
|
||||
android:bottomRightRadius="@dimen/dp_16" />
|
||||
</shape>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/dp_10"
|
||||
android:topRightRadius="@dimen/dp_10" />
|
||||
<gradient
|
||||
android:angle="270"
|
||||
android:endColor="#65C0FF"
|
||||
android:startColor="#308EFF" />
|
||||
</shape>
|
||||
|
|
@ -8,7 +8,6 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:background="@drawable/shape_white_cor16"
|
||||
android:paddingBottom="@dimen/dp_20"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
|
@ -26,9 +25,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:text="温馨提示"
|
||||
android:textColor="@color/color_212226"
|
||||
android:textSize="@dimen/sp_22"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_17"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
|
@ -47,12 +45,12 @@
|
|||
android:id="@+id/tv_tip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="系统检测到您已有账号"
|
||||
android:textColor="@color/color_727686"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
@ -63,9 +61,9 @@
|
|||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:maxHeight="@dimen/dp_300"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_tip"
|
||||
|
|
@ -74,7 +72,7 @@
|
|||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_ok"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="@dimen/dp_116"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
|
|
@ -83,20 +81,11 @@
|
|||
android:text="我知道了"
|
||||
android:textColor="@color/color_90ffffff"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:csb_cornerRadius="@dimen/dp_50"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintDimensionRatio="w,116:40"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/mRecyclerView" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:src="@mipmap/ic_notify_icon"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_white_top_cor16">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="选择地区"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:padding="@dimen/dp_3"
|
||||
android:src="@mipmap/ic_close"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
app:layout_constraintHeight_max="350dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_parent"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/color_f6f6f6"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/listitem_search_option_parent" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_child"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/rv_parent"
|
||||
tools:listitem="@layout/listitem_search_option_child" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="#E8E8E8"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_content" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_content">
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textStyle="bold"
|
||||
app:csb_activeEnable="true"
|
||||
app:csb_cornerRadius="@dimen/dp_10"
|
||||
app:csb_fillColor="@color/color_125ffe"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:gravity="center"
|
||||
android:text="系统检测到您目前尚未登录,但您已成为我们尊贵的会员,为了防止您的会员账号丢失,建议您立即前往登录"
|
||||
android:textColor="@color/color_727686"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,332 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0391F6">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_bszz_bg1"
|
||||
app:layout_constraintDimensionRatio="h,1125:1491"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:src="@mipmap/ic_bszz_bg2"
|
||||
app:layout_constraintDimensionRatio="h,1173:942"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:src="@mipmap/ic_bszz_bg3"
|
||||
app:layout_constraintDimensionRatio="h,1173:1317"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:src="@mipmap/ic_bszz_bg4"
|
||||
app:layout_constraintDimensionRatio="h,1173:2475"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg3" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:src="@mipmap/ic_bszz_bg5"
|
||||
app:layout_constraintDimensionRatio="h,1173:2475"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg4" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-15dp"
|
||||
android:paddingStart="@dimen/dp_45"
|
||||
android:paddingEnd="@dimen/dp_45"
|
||||
android:background="@mipmap/ic_bszz_bg6"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg5">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的地区"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_area"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="450dp"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择注册区域"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的姓名"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_name_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入姓名"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的电话"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_phone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_phone_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入电话"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="短信验证"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_code_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="获取验证码"
|
||||
android:textColor="@color/color_0391f5"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintEnd_toEndOf="@id/et_code"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_code" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="描述"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_code" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_desc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:background="@drawable/shape_ebebeb_line_cor10"
|
||||
android:gravity="start|top"
|
||||
android:hint="请简单描述一下您的需求"
|
||||
android:maxLength="300"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_desc_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:text="0/300"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_desc"
|
||||
app:layout_constraintEnd_toEndOf="@id/et_desc" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_18"
|
||||
android:layout_marginBottom="@dimen/dp_50"
|
||||
android:src="@mipmap/ic_bszz_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="h,792:156"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_desc" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title=" " />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,340 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_dljz_bg1"
|
||||
app:layout_constraintDimensionRatio="h,1125:1506"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_dljz_bg2"
|
||||
app:layout_constraintDimensionRatio="h,1125:1272"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_dljz_bg3"
|
||||
app:layout_constraintDimensionRatio="h,1125:1362"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg2" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_dljz_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg3">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:drawableStart="@drawable/shape_dljz_tag"
|
||||
android:drawablePadding="@dimen/dp_10"
|
||||
android:gravity="center_vertical"
|
||||
android:text="基本信息"
|
||||
android:textColor="#5A2200"
|
||||
android:textSize="@dimen/sp_26"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:text="您的地区"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_area"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择注册区域"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:text="您的姓名"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_name_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入姓名"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:text="您的电话"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_phone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_phone_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入电话"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:text="短信验证"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_code_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="获取验证码"
|
||||
android:textColor="@color/color_ff7522"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintEnd_toEndOf="@id/et_code"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_code" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:text="描述"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_code" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_desc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:background="@drawable/shape_ebebeb_line_cor10"
|
||||
android:gravity="start|top"
|
||||
android:hint="请简单描述一下您的需求"
|
||||
android:maxLength="300"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingEnd="@dimen/dp_8"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_desc_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_text_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:text="0/300"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_desc"
|
||||
app:layout_constraintEnd_toEndOf="@id/et_desc" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_37"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_37"
|
||||
android:layout_marginBottom="@dimen/dp_24"
|
||||
android:src="@mipmap/ic_dljz_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="h,903:168"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_desc" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title=" " />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -139,6 +139,13 @@
|
|||
app:layout_constraintDimensionRatio="h,1125:354"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/windowBackground"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_title_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_bid_title_new"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -185,7 +192,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@color/windowBackground"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_bid_title">
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,303 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="#4F59DE">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_company"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="100dp"
|
||||
tools:listitem="@layout/listitem_qyzc_company"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_qyzc_bg1"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="h,1119:1119"
|
||||
app:layout_constraintTop_toBottomOf="@id/rv_company" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_qyzc_bg2"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="h,1119:650"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg1" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_qyzc_bg3"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="h,1119:1629"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_qyzc_bg4"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="h,1119:996"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg3" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_bg5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_qyzc_bg5"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintDimensionRatio="h,1119:978"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg4" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@mipmap/ic_qyzc_bg6"
|
||||
android:paddingStart="@dimen/dp_38"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_38"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_bg5">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的地区"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_area"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择注册区域"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的姓名"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_name_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入姓名"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的电话"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_phone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_phone_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入电话"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="短信验证"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_code_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="获取验证码"
|
||||
android:textColor="@color/color_4a53d5"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintEnd_toEndOf="@id/et_code"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_code" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_18"
|
||||
android:layout_marginBottom="@dimen/dp_35"
|
||||
android:src="@mipmap/ic_qyzc_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="h,787:166"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line4" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title=" " />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -66,10 +66,7 @@
|
|||
<LinearLayout
|
||||
android:id="@+id/layout_options"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||
|
|
@ -77,7 +74,7 @@
|
|||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_area"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableEnd="@mipmap/ic_option_arrow_down"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
|
|
@ -90,8 +87,7 @@
|
|||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_time"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableEnd="@mipmap/ic_option_arrow_down"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
|
|
@ -104,12 +100,11 @@
|
|||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_sort"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableEnd="@mipmap/ic_option_arrow_down"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:text="排序"
|
||||
android:text="排序方式"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:csb_cornerRadius="@dimen/dp_25"
|
||||
|
|
@ -118,12 +113,11 @@
|
|||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_type"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_34"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:drawableEnd="@mipmap/ic_option_arrow_down"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:text="信息"
|
||||
android:text="信息类型"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:csb_cornerRadius="@dimen/dp_25"
|
||||
|
|
@ -136,7 +130,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@color/windowBackground"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_options">
|
||||
|
||||
|
|
@ -144,6 +137,7 @@
|
|||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_7"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/listitem_bid" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#E4F5FF">
|
||||
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/mRefreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nestedScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_top_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_zzdb_top_bg"
|
||||
app:layout_constraintDimensionRatio="h,1125:693"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<eightbitlab.com.blurview.BlurView
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="205dp"
|
||||
android:background="@drawable/shape_trans_top_cor20"
|
||||
android:paddingTop="@dimen/dp_13"
|
||||
app:blurOverlayColor="#4DFFFFFF"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/listitem_zzdb_info" />
|
||||
</eightbitlab.com.blurview.BlurView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.scwang.smart.refresh.footer.ClassicsFooter
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title=" " />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/layout_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize"
|
||||
android:layout_marginStart="@dimen/dp_50"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintBottom_toBottomOf="@id/mTitleBar">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@drawable/shape_white_cor10"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:drawableStart="@mipmap/ic_search"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入关键词"
|
||||
android:imeOptions="actionSearch"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:paddingStart="@dimen/dp_8"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_clear_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:src="@mipmap/ic_clear_text"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,715 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/iv_top_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_zzdb_detail_top_bg"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/iv_bottom_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/ic_zzdb_detail_bottom_bg"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_base_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_100"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_2a80fc_cor16"
|
||||
android:paddingStart="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_16"
|
||||
android:paddingBottom="@dimen/dp_50"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:text="建筑机电安装工程专业承包资质标准"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_16"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_name_tag1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon1"
|
||||
android:paddingStart="@dimen/dp_3"
|
||||
android:paddingEnd="@dimen/dp_3"
|
||||
android:text="极速响应"
|
||||
android:textColor="#FFB84E"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:csb_cornerRadius="@dimen/dp_3"
|
||||
app:csb_fillColor="#FFFCF6"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_name_tag2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon2"
|
||||
android:paddingStart="@dimen/dp_3"
|
||||
android:paddingEnd="@dimen/dp_3"
|
||||
android:text="专业团队"
|
||||
android:textColor="#2B8FFF"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:csb_cornerRadius="@dimen/dp_3"
|
||||
app:csb_fillColor="#EEF6FF"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_tag1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_name_tag3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon3"
|
||||
android:paddingStart="@dimen/dp_3"
|
||||
android:paddingEnd="@dimen/dp_3"
|
||||
android:text="包含以下服务"
|
||||
android:textColor="#31C740"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:csb_cornerRadius="@dimen/dp_3"
|
||||
app:csb_fillColor="#EEF6FF"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_tag2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_detail_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="-30dp"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_base_info">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_detail_top_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_zzdb_detail_bg"
|
||||
app:layout_constraintDimensionRatio="h,1029:303"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/shape_white_bottom_cor16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_detail_top_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rg_level"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_zzdb_type_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
android:text="一级资质"
|
||||
android:textColor="@drawable/selector_zzdb_type_text_color"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_zzdb_type_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
android:text="二级资质"
|
||||
android:textColor="@drawable/selector_zzdb_type_text_color"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_35"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/selector_zzdb_type_bg"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
android:text="三级资质"
|
||||
android:textColor="@drawable/selector_zzdb_type_text_color"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</RadioGroup>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_range"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_eff8fd_cor10"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/rg_level">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon4"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="承包范围"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_range"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:text="可承担各级公路的路基、中小桥涵、防护几排水、软基处理工程的施工。"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_asset"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_eff8fd_cor10"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_range"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon5"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="企业资产"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_asset"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:text="净资产5000万以上"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_person"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_eff8fd_cor10"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_asset"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon6"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="企业主要人员"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_person"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:lineSpacingExtra="@dimen/dp_6"
|
||||
android:text="(1)公路工程专业一级注册建造师不少于10 人。\n(2)技术负责人具有10年以上从事工程施工技术管理工作经历,且具有公路工程相关专业高级职称或公路工程专业一级注册建造师执业资格:公路工程相关专业中级以上职称人员不少于 40人。\n(3)持有岗位证书的施工现场管理人员不少于15人,且施工员、安全员、造价员等人员齐全。\n(4)经考核或培训合格的中级工以上技术工人不少于20人。"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_performance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_eff8fd_cor10"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_person"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon7"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="企业工程业绩"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_performance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:lineSpacingExtra="@dimen/dp_6"
|
||||
android:text="近10年承担过下列2类工程的施工,工程质量合格\n(1)累计修建一级以上公路路基100公里以上;\n(2)累计完成二级以上公路路基工程合同额3亿元以上;"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_eff8fd_cor10"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/dp_16"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_performance"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:drawableStart="@mipmap/ic_zzdb_detail_icon8"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="center"
|
||||
android:text="技术设备"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:lineSpacingExtra="@dimen/dp_6"
|
||||
android:text="具有下列机械设备:"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="@drawable/shape_zzdb_device_bg"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingBottom="@dimen/dp_10">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="序号"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:gravity="center"
|
||||
android:text="设备描述"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/listitem_zzdb_device" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_26"
|
||||
android:text="展开更多资质说明"
|
||||
android:gravity="center"
|
||||
android:drawableEnd="@mipmap/ic_more_arrow_down"
|
||||
android:layout_marginBottom="@dimen/dp_14"
|
||||
android:textColor="@color/color_2a80fc"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/layout_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:background="@drawable/shape_c3e7ff_cor16"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
app:layout_constraintTop_toBottomOf="@id/layout_detail_info">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/ic_zzdb_content_top_icon"
|
||||
app:layout_constraintDimensionRatio="h,1029:309"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_55"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:background="@drawable/shape_white_cor10"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_14"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的地区"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_area"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_area_title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_area"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:drawableEnd="@mipmap/ic_arrow_dp16"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请选择注册区域"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_area_title"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_area" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的姓名"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_name"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_name_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入姓名"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_name_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="您的电话"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_phone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_phone_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_phone"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入电话"
|
||||
android:inputType="number"
|
||||
android:maxLength="11"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_phone_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line2" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line3"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_phone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="短信验证"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:text="*"
|
||||
android:textColor="@color/color_ff493c"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_code_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/et_code"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_54"
|
||||
android:layout_marginStart="@dimen/dp_40"
|
||||
android:background="@null"
|
||||
android:gravity="center_vertical"
|
||||
android:hint="请输入验证码"
|
||||
android:inputType="number"
|
||||
android:maxLength="6"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textColorHint="@color/color_bcbcbc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_code_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line3" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="获取验证码"
|
||||
android:textColor="@color/color_2a80fc"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="@id/et_code"
|
||||
app:layout_constraintEnd_toEndOf="@id/et_code"
|
||||
app:layout_constraintTop_toTopOf="@id/et_code" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line4"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/color_ebebeb"
|
||||
app:layout_constraintTop_toBottomOf="@id/et_code" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/btn_next"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_46"
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:text="立即办理"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_18"
|
||||
android:textStyle="bold"
|
||||
app:csb_cornerRadius="@dimen/dp_50"
|
||||
app:csb_endColor="#3A70F7"
|
||||
app:csb_orientation="TOP_BOTTOM"
|
||||
app:csb_startColor="#4B96F6"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_line4" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.example.base.widget.TitleBar
|
||||
android:id="@+id/mTitleBar"
|
||||
style="@style/Custom.TitleBar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_back_black"
|
||||
app:title=" " />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_f3f5f9_cor10"
|
||||
android:background="@drawable/shape_f6f6f6_cor10"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12">
|
||||
|
||||
|
|
@ -17,24 +17,17 @@
|
|||
android:maxWidth="@dimen/dp_150"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vip_tag"
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_vip_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_9"
|
||||
android:background="@drawable/shape_466afd_cor4"
|
||||
android:paddingStart="@dimen/dp_3"
|
||||
android:paddingTop="@dimen/dp_1"
|
||||
android:paddingEnd="@dimen/dp_3"
|
||||
android:paddingBottom="@dimen/dp_1"
|
||||
android:text="月会员"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:src="@mipmap/ic_vip_tag1"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_username"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_username"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_username" />
|
||||
|
|
@ -47,7 +40,7 @@
|
|||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:text="2025.02.28 注册"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_username" />
|
||||
|
|
@ -77,8 +70,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="153****5642"
|
||||
android:textColor="@color/color_50ffffff"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_create_time"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_create_time" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_22"
|
||||
android:layout_marginStart="@dimen/dp_13"
|
||||
android:background="@drawable/shape_qyzc_company_bg"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingEnd="@dimen/dp_12">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="重庆**有限公司"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/shape_cccccc_line"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_index"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_222222"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:background="@color/color_cccccc"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_desc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="4"
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:text="1立方米以上挖掘机5台"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
</LinearLayout>
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.lihang.ShadowLayout 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"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginEnd="@dimen/dp_5"
|
||||
app:hl_cornerRadius="@dimen/dp_8"
|
||||
app:hl_shadowColor="#0f000000"
|
||||
app:hl_shadowLimit="@dimen/dp_7">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="@dimen/dp_12"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingEnd="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_14">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:text="建筑机电安装工程专业承包资质标准"
|
||||
android:textColor="@color/color_1a1a1a"
|
||||
android:textSize="@dimen/sp_15"
|
||||
app:layout_constraintEnd_toStartOf="@id/iv_arrow"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_level1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:paddingStart="@dimen/dp_4"
|
||||
android:paddingEnd="@dimen/dp_4"
|
||||
android:text="一级资质"
|
||||
android:textColor="#7269FF"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:csb_cornerRadius="@dimen/dp_3"
|
||||
app:csb_fillColor="#F0EFFF"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_level2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:paddingStart="@dimen/dp_4"
|
||||
android:paddingEnd="@dimen/dp_4"
|
||||
android:text="二级资质"
|
||||
android:textColor="#FFA20B"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:csb_cornerRadius="@dimen/dp_3"
|
||||
app:csb_fillColor="#FFF5E6"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_level1"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
app:layout_goneMarginStart="0dp" />
|
||||
|
||||
<com.cheng.bole.widget.CommonShapeView
|
||||
android:id="@+id/tv_level3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:paddingStart="@dimen/dp_4"
|
||||
android:paddingEnd="@dimen/dp_4"
|
||||
android:text="三级资质"
|
||||
android:textColor="#0CA8FF"
|
||||
android:textSize="@dimen/sp_11"
|
||||
app:csb_cornerRadius="@dimen/dp_3"
|
||||
app:csb_fillColor="#1a0ca8ff"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_level2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_name"
|
||||
app:layout_goneMarginStart="0dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/ic_arrow_dp16"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.lihang.ShadowLayout>
|
||||
|
|
@ -10,7 +10,6 @@
|
|||
android:id="@+id/nestedScrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintHeight_max="@dimen/dp_400"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 232 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 382 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 762 B |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 748 B |