添加发布页面
|
|
@ -1,16 +1,19 @@
|
||||||
package com.cheng.bole.bean
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import android.R
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
class ContactsInfoBean(
|
class ContactsInfoBean(
|
||||||
|
val id: String,
|
||||||
var name: String,
|
var name: String,
|
||||||
var phone: String,
|
var phone: String,
|
||||||
var job: String
|
var job: String,
|
||||||
): Serializable {
|
var isChecked: Boolean = false
|
||||||
|
) : Serializable {
|
||||||
class Job(
|
class Job(
|
||||||
val name: String,
|
val name: String,
|
||||||
var isChecked: Boolean = false
|
var isChecked: Boolean = false
|
||||||
): Serializable
|
) : Serializable
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getPositionList(): List<Job> {
|
fun getPositionList(): List<Job> {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.cheng.bole.bean
|
||||||
|
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
data class SupplierGoodsBean(
|
||||||
|
val city_id: String,
|
||||||
|
val city_name: String,
|
||||||
|
val company: CompanyBean,
|
||||||
|
val contact: List<ContactsInfoBean>,
|
||||||
|
val create_time: String,
|
||||||
|
val file: List<UploadFileEntity>,
|
||||||
|
val goods_description: String,
|
||||||
|
val goods_name: String,
|
||||||
|
val goods_price: String,
|
||||||
|
val goods_price_show: String,
|
||||||
|
val goods_price_type: String,
|
||||||
|
val id: String,
|
||||||
|
val remark: String,
|
||||||
|
val review_time: String,
|
||||||
|
val status: String,
|
||||||
|
val type: String,
|
||||||
|
val update_time: String,
|
||||||
|
val user_id: String,
|
||||||
|
val view_count: String,
|
||||||
|
val is_broadcast: Boolean
|
||||||
|
) : Serializable
|
||||||
|
|
@ -31,4 +31,5 @@ object Constants {
|
||||||
val dDIN_PRO_M = Typeface.createFromAsset(Utils.getApp().assets, "fonts/D-DIN-PRO-500-Medium.otf")
|
val dDIN_PRO_M = Typeface.createFromAsset(Utils.getApp().assets, "fonts/D-DIN-PRO-500-Medium.otf")
|
||||||
val douyinsansB = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DouyinSansBold.otf")
|
val douyinsansB = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DouyinSansBold.otf")
|
||||||
val pmzdbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/PangMenZhengDaoBiaoTiTi.ttf")
|
val pmzdbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/PangMenZhengDaoBiaoTiTi.ttf")
|
||||||
|
val dtjbt = Typeface.createFromAsset(Utils.getApp().assets, "fonts/DingTalk-JinBuTi.ttf")
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.cheng.bole.event
|
||||||
|
|
||||||
|
import com.cheng.bole.bean.ContactsInfoBean
|
||||||
|
|
||||||
|
class ContactsEvent(val contacts: ContactsInfoBean) {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
package com.cheng.bole.event
|
||||||
|
|
||||||
|
class SupplyEvent(val from: Int = 0) {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.cheng.bole.manager
|
||||||
|
|
||||||
|
import android.R
|
||||||
|
import android.text.TextUtils
|
||||||
|
import com.cheng.bole.bean.ContactsInfoBean
|
||||||
|
import com.example.base.utils.MMKVUtils
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import com.google.gson.reflect.TypeToken
|
||||||
|
|
||||||
|
object ContactsManager {
|
||||||
|
|
||||||
|
fun add(contacts: ContactsInfoBean) {
|
||||||
|
val list = all()
|
||||||
|
list.add(contacts)
|
||||||
|
MMKVUtils.put("contacts_list", Gson().toJson(list))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun delete(id: String) {
|
||||||
|
val list = all()
|
||||||
|
val contacts = list.find { it.id == id }
|
||||||
|
if (contacts != null) {
|
||||||
|
list.remove(contacts)
|
||||||
|
}
|
||||||
|
MMKVUtils.put("contacts_list", Gson().toJson(list))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun all(): MutableList<ContactsInfoBean> {
|
||||||
|
val str = MMKVUtils.getString("contacts_list")
|
||||||
|
return if (!TextUtils.isEmpty(str)) {
|
||||||
|
Gson().fromJson(str, object : TypeToken<MutableList<ContactsInfoBean>>(){}.type)
|
||||||
|
} else {
|
||||||
|
mutableListOf()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -19,7 +19,7 @@ import com.cheng.bole.databinding.DialogPublishBidBinding
|
||||||
import com.cheng.bole.manager.EventReportManager
|
import com.cheng.bole.manager.EventReportManager
|
||||||
import com.cheng.bole.ui.activity.PublicActivity
|
import com.cheng.bole.ui.activity.PublicActivity
|
||||||
import com.cheng.bole.ui.fragment.bid.publish.bid.PublishBidMessageFragment
|
import com.cheng.bole.ui.fragment.bid.publish.bid.PublishBidMessageFragment
|
||||||
import com.efs.sdk.memleaksdk.monitor.internal.bi
|
import com.cheng.bole.ui.fragment.bid.publish.goods.PublishGoodsMessageFragment
|
||||||
import com.example.base.extensions.onClick
|
import com.example.base.extensions.onClick
|
||||||
import com.example.base.utils.ScreenUtils
|
import com.example.base.utils.ScreenUtils
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ class PublishBidDialog : DialogFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.layoutGoods.onClick {
|
binding.layoutGoods.onClick {
|
||||||
// PublicActivity.start(requireActivity(), PublishSupplyMessageFragment::class.java, Pair("from", 1))
|
PublicActivity.start(requireActivity(), PublishGoodsMessageFragment::class.java, Pair("from", 1))
|
||||||
EventReportManager.eventReport(EventConstants.JUMP_TO_PUBLISH, "home", "商品")
|
EventReportManager.eventReport(EventConstants.JUMP_TO_PUBLISH, "home", "商品")
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
|
|
@ -82,7 +82,7 @@ class PublishBidDialog : DialogFragment() {
|
||||||
val lp = binding.tvTitle.layoutParams as ConstraintLayout.LayoutParams
|
val lp = binding.tvTitle.layoutParams as ConstraintLayout.LayoutParams
|
||||||
lp.topMargin = (binding.ivTopBg.height * 55f / 291f).toInt()
|
lp.topMargin = (binding.ivTopBg.height * 55f / 291f).toInt()
|
||||||
binding.tvTitle.layoutParams = lp
|
binding.tvTitle.layoutParams = lp
|
||||||
// (binding.tvTitle.layoutParams as ConstraintLayout.LayoutParams).topMargin = (binding.ivTopBg.height * 85f / 291f).toInt()
|
|
||||||
binding.ivTopBg.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
binding.ivTopBg.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ class SelectBidTypeDialog : DialogFragment() {
|
||||||
class BidTypeAdapter : BaseQuickAdapter<BidTypeBean, BaseViewHolder>(R.layout.listitem_bid_type) {
|
class BidTypeAdapter : BaseQuickAdapter<BidTypeBean, BaseViewHolder>(R.layout.listitem_bid_type) {
|
||||||
override fun convert(holder: BaseViewHolder, item: BidTypeBean) {
|
override fun convert(holder: BaseViewHolder, item: BidTypeBean) {
|
||||||
holder.setText(R.id.tv_name, item.name)
|
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_666666))
|
holder.setTextColor(R.id.tv_name, if (item.isChecked) getColor(R.color.color_125ffe) else getColor(R.color.color_1a1a1a))
|
||||||
holder.getView<TextView>(R.id.tv_name).typeface = if (item.isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT
|
holder.getView<TextView>(R.id.tv_name).typeface = if (item.isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT
|
||||||
|
|
||||||
holder.itemView.setBackgroundResource(if (item.isChecked) R.drawable.shape_f1f6f_cor4 else 0)
|
holder.itemView.setBackgroundResource(if (item.isChecked) R.drawable.shape_f1f6f_cor4 else 0)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,167 @@
|
||||||
|
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.ContactsInfoBean
|
||||||
|
import com.cheng.bole.databinding.DialogSelectContactsBinding
|
||||||
|
import com.cheng.bole.event.ContactsEvent
|
||||||
|
import com.cheng.bole.manager.ContactsManager
|
||||||
|
import com.cheng.bole.ui.activity.PublicActivity
|
||||||
|
import com.cheng.bole.ui.fragment.bid.publish.contacts.AddContactsFragment
|
||||||
|
import com.example.base.common.RxBus
|
||||||
|
import com.example.base.extensions.onClick
|
||||||
|
import com.example.base.extensions.toast
|
||||||
|
import com.example.base.utils.ScreenUtils
|
||||||
|
import com.example.base.widget.EmptyView
|
||||||
|
import com.example.base.widget.PageStatus
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import com.google.gson.reflect.TypeToken
|
||||||
|
import io.reactivex.disposables.Disposable
|
||||||
|
|
||||||
|
class SelectContactsDialog : DialogFragment() {
|
||||||
|
private val mAdapter by lazy { ContactsAdapter() }
|
||||||
|
|
||||||
|
private val mEmptyView by lazy { EmptyView(requireContext()) }
|
||||||
|
|
||||||
|
private var contactsEvent: Disposable? = null
|
||||||
|
|
||||||
|
private var mOnBackListener: ((List<ContactsInfoBean>) -> Unit)? = null //回调事件
|
||||||
|
|
||||||
|
private lateinit var binding: DialogSelectContactsBinding
|
||||||
|
|
||||||
|
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_contacts, null)
|
||||||
|
|
||||||
|
binding = DialogSelectContactsBinding.bind(view)
|
||||||
|
|
||||||
|
binding.mRecyclerView.adapter = mAdapter
|
||||||
|
mEmptyView.setNoDataLogo(R.mipmap.ic_empty_contacts)
|
||||||
|
mEmptyView.setNoDataText("暂无联系人信息")
|
||||||
|
mAdapter.setEmptyView(mEmptyView)
|
||||||
|
|
||||||
|
mAdapter.setOnItemClickListener { _, _, i ->
|
||||||
|
val item = mAdapter.getItem(i)
|
||||||
|
item.isChecked = !item.isChecked
|
||||||
|
mAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
binding.tvTitle.text = "已选择${mAdapter.data.filter { it.isChecked }.size}人"
|
||||||
|
}
|
||||||
|
|
||||||
|
mAdapter.setOnItemChildClickListener { _, _, i ->
|
||||||
|
PublicActivity.start(requireContext(), AddContactsFragment::class.java, Pair("item", mAdapter.getItem(i)))
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnAdd.onClick {
|
||||||
|
PublicActivity.start(requireContext(), AddContactsFragment::class.java)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnNext.onClick {
|
||||||
|
val selectList = mAdapter.data.filter { it.isChecked }
|
||||||
|
if (selectList.isEmpty()) {
|
||||||
|
toast("请选择联系人")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
mOnBackListener?.invoke(selectList)
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.ivClose.onClick { dismiss() }
|
||||||
|
|
||||||
|
contactsEvent = RxBus.defaultInstance.toObservable(ContactsEvent::class.java).subscribe {
|
||||||
|
setData(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
setData(true)
|
||||||
|
|
||||||
|
val dialog = Dialog(requireContext())
|
||||||
|
dialog.setContentView(view)
|
||||||
|
return dialog
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setData(init: Boolean) {
|
||||||
|
val selectList = if (init) {
|
||||||
|
val listStr = arguments?.getString("list") ?: ""
|
||||||
|
if (!TextUtils.isEmpty(listStr)) {
|
||||||
|
Gson().fromJson(listStr, object : TypeToken<MutableList<ContactsInfoBean>>() {}.type)
|
||||||
|
} else mutableListOf()
|
||||||
|
} else {
|
||||||
|
mAdapter.data.filter { it.isChecked }
|
||||||
|
}
|
||||||
|
|
||||||
|
val contactsList = ContactsManager.all()
|
||||||
|
contactsList.forEach { contacts ->
|
||||||
|
if (selectList.find { it.id == contacts.id } != null) {
|
||||||
|
contacts.isChecked = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mAdapter.setList(contactsList)
|
||||||
|
if (mAdapter.data.isNotEmpty()) {
|
||||||
|
mEmptyView.setStatus(PageStatus.GONG)
|
||||||
|
} else {
|
||||||
|
mEmptyView.setStatus(PageStatus.NO_DATA)
|
||||||
|
}
|
||||||
|
binding.tvTitle.text = "已选择${mAdapter.data.filter { it.isChecked }.size}人"
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
contactsEvent?.dispose()
|
||||||
|
super.onDestroyView()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setOnSelectListener(listener: ((List<ContactsInfoBean>) -> Unit)) {
|
||||||
|
mOnBackListener = listener
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(list: List<ContactsInfoBean>): SelectContactsDialog {
|
||||||
|
val arg = Bundle()
|
||||||
|
arg.putString("list", Gson().toJson(list))
|
||||||
|
val fragment = SelectContactsDialog()
|
||||||
|
fragment.arguments = arg
|
||||||
|
return fragment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ContactsAdapter : BaseQuickAdapter<ContactsInfoBean, BaseViewHolder>(R.layout.listitem_contacts) {
|
||||||
|
|
||||||
|
init {
|
||||||
|
addChildClickViewIds(R.id.iv_edit)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun convert(holder: BaseViewHolder, item: ContactsInfoBean) {
|
||||||
|
holder.setText(R.id.tv_phone, item.phone)
|
||||||
|
holder.setText(R.id.tv_name, "${item.name} | ${item.job}")
|
||||||
|
holder.setImageResource(R.id.iv_check, if (item.isChecked) R.mipmap.ic_rb_checked else R.mipmap.ic_rb_default)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,117 @@
|
||||||
|
package com.cheng.bole.ui.dialog
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.app.Dialog
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.Typeface
|
||||||
|
import android.graphics.drawable.ColorDrawable
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.Gravity
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.TextView
|
||||||
|
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.BidTypeBean
|
||||||
|
import com.cheng.bole.databinding.DialogSelectGoodsTypeBinding
|
||||||
|
import com.example.base.extensions.getColor
|
||||||
|
import com.example.base.extensions.onClick
|
||||||
|
import com.example.base.extensions.toast
|
||||||
|
import com.example.base.utils.ScreenUtils
|
||||||
|
|
||||||
|
class SelectGoodsTypeDialog : DialogFragment() {
|
||||||
|
private val typeList by lazy {
|
||||||
|
listOf(
|
||||||
|
BidTypeBean("1", "提供服务"),
|
||||||
|
BidTypeBean("2", "提供产品"),
|
||||||
|
BidTypeBean("3", "其他")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val type by lazy { arguments?.getString("type") ?: "" }
|
||||||
|
private val mAdapter by lazy { GoodsTypeAdapter() }
|
||||||
|
|
||||||
|
private var bidType: BidTypeBean? = null
|
||||||
|
|
||||||
|
private var mOnBackListener: ((BidTypeBean) -> Unit)? = null //回调事件
|
||||||
|
|
||||||
|
private lateinit var binding: DialogSelectGoodsTypeBinding
|
||||||
|
|
||||||
|
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_goods_type, null)
|
||||||
|
|
||||||
|
binding = DialogSelectGoodsTypeBinding.bind(view)
|
||||||
|
|
||||||
|
binding.mRecyclerView.adapter = mAdapter
|
||||||
|
typeList.find { it.id == type }?.isChecked = true
|
||||||
|
mAdapter.setList(typeList)
|
||||||
|
|
||||||
|
mAdapter.setOnItemClickListener { _, _, i ->
|
||||||
|
val item = mAdapter.getItem(i)
|
||||||
|
mAdapter.data.find { it.isChecked }?.isChecked = false
|
||||||
|
item.isChecked = true
|
||||||
|
bidType = item
|
||||||
|
mAdapter.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnNext.onClick {
|
||||||
|
if (bidType == null) {
|
||||||
|
toast("请选择类型")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
mOnBackListener?.invoke(bidType!!)
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.ivClose.onClick { dismiss() }
|
||||||
|
|
||||||
|
val dialog = Dialog(requireContext())
|
||||||
|
dialog.setContentView(view)
|
||||||
|
return dialog
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setOnSelectListener(listener: ((BidTypeBean) -> Unit)) {
|
||||||
|
mOnBackListener = listener
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(type: String): SelectGoodsTypeDialog {
|
||||||
|
val arg = Bundle()
|
||||||
|
arg.putString("type", type)
|
||||||
|
val fragment = SelectGoodsTypeDialog()
|
||||||
|
fragment.arguments = arg
|
||||||
|
return fragment
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GoodsTypeAdapter : BaseQuickAdapter<BidTypeBean, BaseViewHolder>(R.layout.listitem_bid_type) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: BidTypeBean) {
|
||||||
|
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.getView<TextView>(R.id.tv_name).typeface = if (item.isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT
|
||||||
|
|
||||||
|
holder.itemView.setBackgroundResource(if (item.isChecked) R.drawable.shape_f1f6f_cor4 else 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,10 +7,6 @@ import com.cheng.bole.bean.ContactsInfoBean
|
||||||
|
|
||||||
class AddBidContactsAdapter: BaseQuickAdapter<ContactsInfoBean, BaseViewHolder>(R.layout.listitem_publish_bid_contacts) {
|
class AddBidContactsAdapter: BaseQuickAdapter<ContactsInfoBean, BaseViewHolder>(R.layout.listitem_publish_bid_contacts) {
|
||||||
|
|
||||||
init {
|
|
||||||
addChildClickViewIds(R.id.iv_edit)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun convert(holder: BaseViewHolder, item: ContactsInfoBean) {
|
override fun convert(holder: BaseViewHolder, item: ContactsInfoBean) {
|
||||||
holder.setText(R.id.tv_name, item.name)
|
holder.setText(R.id.tv_name, item.name)
|
||||||
holder.setText(R.id.tv_phone, item.phone)
|
holder.setText(R.id.tv_phone, item.phone)
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ package com.cheng.bole.ui.fragment.bid.publish.bid
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
|
import android.view.ViewOutlineProvider
|
||||||
|
import android.view.ViewTreeObserver
|
||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import com.cheng.bole.R
|
import com.cheng.bole.R
|
||||||
import com.cheng.bole.bean.AreaBean
|
import com.cheng.bole.bean.AreaBean
|
||||||
import com.cheng.bole.bean.AttachmentBean
|
import com.cheng.bole.bean.AttachmentBean
|
||||||
|
|
@ -16,6 +19,7 @@ import com.cheng.bole.impl.TextWatcherImpl
|
||||||
import com.cheng.bole.manager.UserConfigManager
|
import com.cheng.bole.manager.UserConfigManager
|
||||||
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
||||||
import com.cheng.bole.ui.dialog.SelectBidTypeDialog
|
import com.cheng.bole.ui.dialog.SelectBidTypeDialog
|
||||||
|
import com.cheng.bole.ui.dialog.SelectContactsDialog
|
||||||
import com.cheng.bole.utils.FileProviderUtils
|
import com.cheng.bole.utils.FileProviderUtils
|
||||||
import com.cheng.bole.utils.GlideEngine
|
import com.cheng.bole.utils.GlideEngine
|
||||||
import com.cheng.bole.utils.PermissionUtils
|
import com.cheng.bole.utils.PermissionUtils
|
||||||
|
|
@ -67,10 +71,25 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
|
|
||||||
override fun initView() {
|
override fun initView() {
|
||||||
super.initView()
|
super.initView()
|
||||||
|
binding.tvDesc.typeface = Constants.dtjbt
|
||||||
|
|
||||||
binding.rvImages.adapter = imageAdapter
|
binding.rvImages.adapter = imageAdapter
|
||||||
binding.rvFiles.adapter = fileAdapter
|
binding.rvFiles.adapter = fileAdapter
|
||||||
binding.rvContacts.adapter = contactsAdapter
|
binding.rvContacts.adapter = contactsAdapter
|
||||||
|
|
||||||
|
binding.ivTopBg.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||||
|
override fun onGlobalLayout() {
|
||||||
|
val lp1 = binding.tvDesc.layoutParams as ConstraintLayout.LayoutParams
|
||||||
|
lp1.topMargin = (binding.ivTopBg.height * 100f / 314f).toInt()
|
||||||
|
binding.tvDesc.layoutParams = lp1
|
||||||
|
|
||||||
|
binding.layoutContent.setupWith(binding.layoutContainer).setFrameClearDrawable(binding.layoutContent.background).setBlurRadius(5f)
|
||||||
|
binding.layoutContent.outlineProvider = ViewOutlineProvider.BACKGROUND
|
||||||
|
binding.layoutContent.setClipToOutline(true)
|
||||||
|
|
||||||
|
binding.ivTopBg.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initData() {
|
override fun initData() {
|
||||||
|
|
@ -88,46 +107,48 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
override fun initListener() {
|
override fun initListener() {
|
||||||
super.initListener()
|
super.initListener()
|
||||||
binding.etProjectInfo.addTextChangedListener(textWatcher)
|
binding.etInfo.addTextChangedListener(textWatcher)
|
||||||
|
|
||||||
binding.tvProjectType.onClick {
|
binding.tvType.onClick {
|
||||||
val f = SelectBidTypeDialog.newInstance(bidType)
|
val f = SelectBidTypeDialog.newInstance(bidType)
|
||||||
f.setOnSelectListener {
|
f.setOnSelectListener {
|
||||||
bidType = it
|
bidType = it
|
||||||
binding.tvProjectType.text = it.name
|
binding.tvType.text = it.name
|
||||||
}
|
}
|
||||||
f.show(childFragmentManager, SelectBidTypeDialog::class.java.simpleName)
|
f.show(childFragmentManager, SelectBidTypeDialog::class.java.simpleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.tvProjectArea.onClick {
|
binding.tvArea.onClick {
|
||||||
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
val f = SelectAreaDialog.newInstance(if (city != null) listOf(city!!) else emptyList(), true)
|
||||||
f.setOnSelectListener {
|
f.setOnSelectListener {
|
||||||
city = it[0]
|
city = it[0]
|
||||||
binding.tvProjectArea.text = city!!.name
|
binding.tvArea.text = city!!.name
|
||||||
}
|
}
|
||||||
f.show(childFragmentManager, SelectAreaDialog::class.java.simpleName)
|
f.show(childFragmentManager, SelectAreaDialog::class.java.simpleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.tvUploadFile.onClick {
|
binding.layoutUploadFile.onClick {
|
||||||
fileLauncher.launch("application/pdf")
|
fileLauncher.launch("application/pdf")
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.tvAddContacts.onClick {
|
binding.ivAddContacts.onClick {
|
||||||
/*val f = AddContactsDialog.newInstance(null)
|
val f = SelectContactsDialog.newInstance(contactsAdapter.data)
|
||||||
f.setOnSelectListener {
|
f.setOnSelectListener {
|
||||||
contactsAdapter.addData(it)
|
contactsAdapter.setList(it)
|
||||||
|
binding.rvContacts.visible()
|
||||||
|
binding.tvContacts.gone()
|
||||||
if (contactsAdapter.data.size == 5) {
|
if (contactsAdapter.data.size == 5) {
|
||||||
binding.tvAddContacts.gone()
|
binding.ivAddContacts.gone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
f.show(childFragmentManager, AddContactsDialog::class.java.simpleName)*/
|
f.show(childFragmentManager, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.rgProjectInfoType.setOnCheckedChangeListener { _, checkedId ->
|
binding.rgInfoType.setOnCheckedChangeListener { _, checkedId ->
|
||||||
when (checkedId) {
|
when (checkedId) {
|
||||||
R.id.rb1 -> {
|
R.id.rb1 -> {
|
||||||
contentType = 1
|
contentType = 1
|
||||||
binding.etProjectInfo.visible()
|
binding.etInfo.visible()
|
||||||
binding.tvTextCount.visible()
|
binding.tvTextCount.visible()
|
||||||
binding.tvImageCount.gone()
|
binding.tvImageCount.gone()
|
||||||
binding.tvImageLimitTip.gone()
|
binding.tvImageLimitTip.gone()
|
||||||
|
|
@ -136,7 +157,7 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
|
|
||||||
R.id.rb2 -> {
|
R.id.rb2 -> {
|
||||||
contentType = 2
|
contentType = 2
|
||||||
binding.etProjectInfo.gone()
|
binding.etInfo.gone()
|
||||||
binding.tvTextCount.gone()
|
binding.tvTextCount.gone()
|
||||||
binding.tvImageCount.visible()
|
binding.tvImageCount.visible()
|
||||||
binding.tvImageLimitTip.visible()
|
binding.tvImageLimitTip.visible()
|
||||||
|
|
@ -186,19 +207,10 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
.create()
|
.create()
|
||||||
}
|
}
|
||||||
|
|
||||||
contactsAdapter.setOnItemChildClickListener { _, _, i ->
|
|
||||||
/*val f = AddContactsDialog.newInstance(contactsAdapter.getItem(i))
|
|
||||||
f.setOnSelectListener {
|
|
||||||
contactsAdapter.removeAt(i)
|
|
||||||
contactsAdapter.addData(i, it)
|
|
||||||
}
|
|
||||||
f.show(childFragmentManager, AddContactsDialog::class.java.simpleName)*/
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.btnNext.onClick {
|
binding.btnNext.onClick {
|
||||||
val name = binding.etProjectName.text.toString().trim()
|
val name = binding.etName.text.toString().trim()
|
||||||
val price = binding.etProjectPrice.text.toString().trim()
|
val price = binding.etPrice.text.toString().trim()
|
||||||
val contentText = binding.etProjectInfo.text.toString().trim()
|
val contentText = binding.etInfo.text.toString().trim()
|
||||||
if (bidType == null) {
|
if (bidType == null) {
|
||||||
toast("请选择项目类型")
|
toast("请选择项目类型")
|
||||||
return@onClick
|
return@onClick
|
||||||
|
|
@ -267,17 +279,17 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
.append("/5)")
|
.append("/5)")
|
||||||
.create()
|
.create()
|
||||||
if (fileAdapter.data.size == 5) {
|
if (fileAdapter.data.size == 5) {
|
||||||
binding.tvUploadFile.gone()
|
binding.layoutUploadFile.gone()
|
||||||
} else {
|
} else {
|
||||||
binding.tvUploadFile.visible()
|
binding.layoutUploadFile.visible()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun commit() {
|
private fun commit() {
|
||||||
val name = binding.etProjectName.text.toString().trim()
|
val name = binding.etName.text.toString().trim()
|
||||||
val price = binding.etProjectPrice.text.toString().trim()
|
val price = binding.etPrice.text.toString().trim()
|
||||||
val contentText = binding.etProjectInfo.text.toString().trim()
|
val contentText = binding.etInfo.text.toString().trim()
|
||||||
|
|
||||||
val jsonObject = JsonObject()
|
val jsonObject = JsonObject()
|
||||||
jsonObject.addProperty("origin_title", name)
|
jsonObject.addProperty("origin_title", name)
|
||||||
|
|
@ -331,17 +343,17 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
binding.tvTime.text = detail.review_time
|
binding.tvTime.text = detail.review_time
|
||||||
binding.layoutRejectReason.visible()
|
binding.layoutRejectReason.visible()
|
||||||
}
|
}
|
||||||
binding.etProjectName.setText(detail.origin_title)
|
binding.etName.setText(detail.origin_title)
|
||||||
binding.etProjectPrice.setText(detail.project_amount)
|
binding.etPrice.setText(detail.project_amount)
|
||||||
|
|
||||||
city = UserConfigManager.getCityList().find { it.id == detail.city_id.toInt() }
|
city = UserConfigManager.getCityList().find { it.id == detail.city_id.toInt() }
|
||||||
if (city != null) binding.tvProjectArea.text = city!!.name
|
if (city != null) binding.tvArea.text = city!!.name
|
||||||
|
|
||||||
bidType = UserConfigManager.getBidTypes().find { it.id == detail.type_id }
|
bidType = UserConfigManager.getBidTypes().find { it.id == detail.type_id }
|
||||||
if (bidType != null) binding.tvProjectType.text = bidType!!.name
|
if (bidType != null) binding.tvType.text = bidType!!.name
|
||||||
|
|
||||||
if (detail.content_type == "1") {
|
if (detail.content_type == "1") {
|
||||||
binding.etProjectInfo.setText(detail.origin_content.toString())
|
binding.etInfo.setText(detail.origin_content.toString())
|
||||||
binding.rb1.isChecked = true
|
binding.rb1.isChecked = true
|
||||||
} else {
|
} else {
|
||||||
val imageList = Gson().fromJson<List<UploadFileEntity>>(Gson().toJson(detail.origin_content), object : TypeToken<List<UploadFileEntity>>(){}.type)
|
val imageList = Gson().fromJson<List<UploadFileEntity>>(Gson().toJson(detail.origin_content), object : TypeToken<List<UploadFileEntity>>(){}.type)
|
||||||
|
|
@ -358,12 +370,12 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
|
|
||||||
fileAdapter.setList(detail.origin_attachment)
|
fileAdapter.setList(detail.origin_attachment)
|
||||||
if (fileAdapter.data.size == 5) {
|
if (fileAdapter.data.size == 5) {
|
||||||
binding.tvUploadFile.gone()
|
binding.layoutUploadFile.gone()
|
||||||
}
|
}
|
||||||
|
|
||||||
contactsAdapter.setList(detail.contact)
|
contactsAdapter.setList(detail.contact)
|
||||||
if (contactsAdapter.data.size == 5) {
|
if (contactsAdapter.data.size == 5) {
|
||||||
binding.tvAddContacts.gone()
|
binding.ivAddContacts.gone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -411,7 +423,7 @@ class PublishBidMessageFragment : BaseFragment<FragmentPublishBidMessageBinding,
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
binding.etProjectInfo.removeTextChangedListener(textWatcher)
|
binding.etInfo.removeTextChangedListener(textWatcher)
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
package com.cheng.bole.ui.fragment.bid.publish.contacts
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.os.Build
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.view.View
|
||||||
|
import com.cheng.bole.bean.ContactsInfoBean
|
||||||
|
import com.cheng.bole.databinding.FragmentAddContactsBinding
|
||||||
|
import com.cheng.bole.event.ContactsEvent
|
||||||
|
import com.cheng.bole.manager.ContactsManager
|
||||||
|
import com.cheng.bole.manager.DialogEnum
|
||||||
|
import com.cheng.bole.ui.dialog.TipDialog
|
||||||
|
import com.efs.sdk.memleaksdk.monitor.internal.bi
|
||||||
|
import com.example.base.common.RxBus
|
||||||
|
import com.example.base.decoration.GridSpaceItemDecoration
|
||||||
|
import com.example.base.extensions.onClick
|
||||||
|
import com.example.base.extensions.toast
|
||||||
|
import com.example.base.extensions.visible
|
||||||
|
import com.example.base.ui.BaseFragment
|
||||||
|
import com.example.base.utils.DensityUtils
|
||||||
|
import java.util.UUID
|
||||||
|
|
||||||
|
class AddContactsFragment: BaseFragment<FragmentAddContactsBinding, AddContactsViewModel>() {
|
||||||
|
private val mAdapter by lazy { ContactsJobAdapter() }
|
||||||
|
|
||||||
|
private var contactsInfo: ContactsInfoBean? = null
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
super.initView()
|
||||||
|
mTitleBar?.setBackgroundColor(Color.WHITE)
|
||||||
|
|
||||||
|
binding.rvJob.adapter = mAdapter
|
||||||
|
binding.rvJob.addItemDecoration(GridSpaceItemDecoration(3, DensityUtils.dp2px(8f), DensityUtils.dp2px(8f)))
|
||||||
|
mAdapter.setList(ContactsInfoBean.getPositionList())
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initData() {
|
||||||
|
super.initData()
|
||||||
|
contactsInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
arguments?.getSerializable("item", ContactsInfoBean::class.java)
|
||||||
|
} else {
|
||||||
|
arguments?.getSerializable("item") as? ContactsInfoBean
|
||||||
|
}
|
||||||
|
setData()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initListener() {
|
||||||
|
super.initListener()
|
||||||
|
mAdapter.setOnItemClickListener { _, _, i ->
|
||||||
|
val item = mAdapter.getItem(i)
|
||||||
|
mAdapter.data.find { it.isChecked }?.isChecked = false
|
||||||
|
item.isChecked = true
|
||||||
|
mAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
|
binding.etJob.setText(item.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnDelete.onClick {
|
||||||
|
if (contactsInfo != null) {
|
||||||
|
val f = TipDialog.newInstance("温馨提示", "确定删除该联系人?")
|
||||||
|
f.setOnSelectListener {
|
||||||
|
if (it == DialogEnum.CLICK_OK) {
|
||||||
|
ContactsManager.delete(contactsInfo!!.id)
|
||||||
|
RxBus.defaultInstance.post(ContactsEvent(contactsInfo!!))
|
||||||
|
requireActivity().finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
f.show(childFragmentManager, "")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnNext.onClick {
|
||||||
|
val name = binding.etName.text.toString().trim()
|
||||||
|
val contacts = binding.etPhone.text.toString().trim()
|
||||||
|
val job = binding.etJob.text.toString().trim()
|
||||||
|
if (TextUtils.isEmpty(name)) {
|
||||||
|
toast("请输入姓名")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (TextUtils.isEmpty(contacts)) {
|
||||||
|
toast("请输入联系方式")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (TextUtils.isEmpty(job) && mAdapter.data.find { it.isChecked } == null) {
|
||||||
|
toast("请输入职位")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
val contactsInfo = ContactsInfoBean(UUID.randomUUID().toString(), name, contacts, mAdapter.data.find { it.isChecked }?.name ?: job)
|
||||||
|
ContactsManager.add(contactsInfo)
|
||||||
|
RxBus.defaultInstance.post(ContactsEvent(contactsInfo))
|
||||||
|
requireActivity().finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initObserve() {
|
||||||
|
super.initObserve()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setData() {
|
||||||
|
if (contactsInfo != null) {
|
||||||
|
binding.etName.setText(contactsInfo!!.name)
|
||||||
|
binding.etPhone.setText(contactsInfo!!.phone)
|
||||||
|
binding.etJob.setText(contactsInfo!!.job)
|
||||||
|
}
|
||||||
|
binding.btnDelete.visibility = if (contactsInfo != null) View.VISIBLE else View.GONE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.cheng.bole.ui.fragment.bid.publish.contacts
|
||||||
|
|
||||||
|
import com.example.base.viewmodel.BaseViewModel
|
||||||
|
|
||||||
|
class AddContactsViewModel: BaseViewModel() {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.cheng.bole.ui.fragment.bid.publish.contacts
|
||||||
|
|
||||||
|
import android.graphics.Typeface
|
||||||
|
import android.widget.TextView
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
|
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||||
|
import com.cheng.bole.R
|
||||||
|
import com.cheng.bole.bean.ContactsInfoBean
|
||||||
|
import com.example.base.extensions.getColor
|
||||||
|
|
||||||
|
class ContactsJobAdapter : BaseQuickAdapter<ContactsInfoBean.Job, BaseViewHolder>(R.layout.listitem_contacts_job) {
|
||||||
|
override fun convert(holder: BaseViewHolder, item: ContactsInfoBean.Job) {
|
||||||
|
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.getView<TextView>(R.id.tv_name).typeface = if (item.isChecked) Typeface.DEFAULT_BOLD else Typeface.DEFAULT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,339 @@
|
||||||
|
package com.cheng.bole.ui.fragment.bid.publish.goods
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.os.Build
|
||||||
|
import android.text.TextUtils
|
||||||
|
import android.view.ViewOutlineProvider
|
||||||
|
import android.view.ViewTreeObserver
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
import com.cheng.bole.R
|
||||||
|
import com.cheng.bole.bean.AreaBean
|
||||||
|
import com.cheng.bole.bean.SupplierGoodsBean
|
||||||
|
import com.cheng.bole.bean.UploadFileEntity
|
||||||
|
import com.cheng.bole.common.Constants
|
||||||
|
import com.cheng.bole.databinding.FragmentPublishGoodsMessageBinding
|
||||||
|
import com.cheng.bole.impl.TextWatcherImpl
|
||||||
|
import com.cheng.bole.manager.UserConfigManager
|
||||||
|
import com.cheng.bole.ui.dialog.SelectAreaDialog
|
||||||
|
import com.cheng.bole.ui.dialog.SelectContactsDialog
|
||||||
|
import com.cheng.bole.ui.dialog.SelectGoodsTypeDialog
|
||||||
|
import com.cheng.bole.ui.fragment.bid.publish.bid.AddBidContactsAdapter
|
||||||
|
import com.cheng.bole.ui.fragment.bid.publish.bid.AddBidImageAdapter
|
||||||
|
import com.cheng.bole.utils.GlideEngine
|
||||||
|
import com.cheng.bole.utils.PermissionUtils
|
||||||
|
import com.example.base.extensions.getColor
|
||||||
|
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.SpanUtils
|
||||||
|
import com.google.gson.Gson
|
||||||
|
import com.google.gson.JsonArray
|
||||||
|
import com.google.gson.JsonObject
|
||||||
|
import com.google.gson.reflect.TypeToken
|
||||||
|
import com.huantansheng.easyphotos.EasyPhotos
|
||||||
|
import com.huantansheng.easyphotos.callback.SelectCallback
|
||||||
|
import com.huantansheng.easyphotos.models.album.entity.Photo
|
||||||
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
|
|
||||||
|
class PublishGoodsMessageFragment: BaseFragment<FragmentPublishGoodsMessageBinding, PublishGoodsMessageViewModel>() {
|
||||||
|
private val from by lazy { arguments?.getInt("from") ?: 0 }
|
||||||
|
|
||||||
|
private var goodsDetail: SupplierGoodsBean? = null
|
||||||
|
|
||||||
|
private val imageAdapter by lazy { AddBidImageAdapter(requireContext(), uploadedImgList) }
|
||||||
|
private var uploadedImgList: ArrayList<UploadFileEntity> = ArrayList()
|
||||||
|
private val deletedList = mutableListOf<String>()
|
||||||
|
|
||||||
|
private val contactsAdapter by lazy { AddBidContactsAdapter() }
|
||||||
|
|
||||||
|
private var goodsType: String = "" // 1 提供服务 2 提供产品 3其他
|
||||||
|
private var priceType: Int = 1 // 1 具体价格 2 面议
|
||||||
|
|
||||||
|
private var city: AreaBean? = null
|
||||||
|
|
||||||
|
private val textWatcher = object : TextWatcherImpl() {
|
||||||
|
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||||
|
super.onTextChanged(s, start, before, count)
|
||||||
|
SpanUtils.with(binding.tvTextCount)
|
||||||
|
.append("${s?.length ?: 0}")
|
||||||
|
.setForegroundColor(getColor(R.color.color_1a1a1a))
|
||||||
|
.append("/500")
|
||||||
|
.create()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun initView() {
|
||||||
|
super.initView()
|
||||||
|
binding.tvDesc.typeface = Constants.dtjbt
|
||||||
|
|
||||||
|
imageAdapter.selectMax = 5
|
||||||
|
binding.rvImages.adapter = imageAdapter
|
||||||
|
binding.rvContacts.adapter = contactsAdapter
|
||||||
|
|
||||||
|
binding.ivTopBg.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||||
|
override fun onGlobalLayout() {
|
||||||
|
val lp1 = binding.tvDesc.layoutParams as ConstraintLayout.LayoutParams
|
||||||
|
lp1.topMargin = (binding.ivTopBg.height * 100f / 314f).toInt()
|
||||||
|
binding.tvDesc.layoutParams = lp1
|
||||||
|
|
||||||
|
binding.layoutContent.setupWith(binding.layoutContainer).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()
|
||||||
|
goodsDetail = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
arguments?.getSerializable("item", SupplierGoodsBean::class.java)
|
||||||
|
} else {
|
||||||
|
arguments?.getSerializable("item") as? SupplierGoodsBean
|
||||||
|
}
|
||||||
|
if (goodsDetail != null) {
|
||||||
|
setData(goodsDetail!!)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
override fun initListener() {
|
||||||
|
super.initListener()
|
||||||
|
binding.etExplain.addTextChangedListener(textWatcher)
|
||||||
|
|
||||||
|
binding.tvType.onClick {
|
||||||
|
val f = SelectGoodsTypeDialog.newInstance(goodsType)
|
||||||
|
f.setOnSelectListener {
|
||||||
|
goodsType = it.id
|
||||||
|
binding.tvType.text = it.name
|
||||||
|
}
|
||||||
|
f.show(childFragmentManager, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
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.ivAddContacts.onClick {
|
||||||
|
val f = SelectContactsDialog.newInstance(contactsAdapter.data)
|
||||||
|
f.setOnSelectListener {
|
||||||
|
contactsAdapter.setList(it)
|
||||||
|
binding.rvContacts.visible()
|
||||||
|
binding.tvContacts.gone()
|
||||||
|
if (contactsAdapter.data.size == 5) {
|
||||||
|
binding.ivAddContacts.gone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
f.show(childFragmentManager, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvPrice1.onClick {
|
||||||
|
binding.rbPrice1.isChecked = true
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvPrice2.onClick {
|
||||||
|
binding.rbPrice2.isChecked = true
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.rgPriceType.setOnCheckedChangeListener { _, checkedId ->
|
||||||
|
when(checkedId) {
|
||||||
|
R.id.rb_price1 -> {
|
||||||
|
priceType = 1
|
||||||
|
binding.etPrice.setText("")
|
||||||
|
binding.etPrice.isEnabled = true
|
||||||
|
binding.tvUnit.visible()
|
||||||
|
}
|
||||||
|
R.id.rb_price2 -> {
|
||||||
|
priceType = 2
|
||||||
|
binding.etPrice.setText("面议")
|
||||||
|
binding.etPrice.isEnabled = false
|
||||||
|
binding.tvUnit.gone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
imageAdapter.setOnItemClick { type, position ->
|
||||||
|
when (type) {
|
||||||
|
AddBidImageAdapter.TYPE_ADD -> {
|
||||||
|
PermissionUtils.checkPhotoPermission(requireActivity(), childFragmentManager, true) { isGranted ->
|
||||||
|
if (isGranted) selectPhoto()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AddBidImageAdapter.TYPE_DELETE -> {
|
||||||
|
if (uploadedImgList.isNotEmpty()) {
|
||||||
|
if (goodsDetail == null) {
|
||||||
|
mViewModel.deleteFile(imageAdapter.data[position].id)
|
||||||
|
}
|
||||||
|
deletedList.add(uploadedImgList[position].id)
|
||||||
|
uploadedImgList.removeAt(position)
|
||||||
|
imageAdapter.notifyDataSetChanged()
|
||||||
|
SpanUtils.with(binding.tvImageCount)
|
||||||
|
.append("(")
|
||||||
|
.append("${uploadedImgList.size}")
|
||||||
|
.setForegroundColor(getColor(R.color.color_ff493c))
|
||||||
|
.append("/5)")
|
||||||
|
.create()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.btnNext.onClick {
|
||||||
|
val name = binding.etName.text.toString().trim()
|
||||||
|
val price = binding.etPrice.text.toString().trim()
|
||||||
|
val desc = binding.etExplain.text.toString().trim()
|
||||||
|
if (TextUtils.isEmpty(name)) {
|
||||||
|
toast("请输入名称")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (priceType == 1 && TextUtils.isEmpty(price)) {
|
||||||
|
toast("请输入价格")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (city == null) {
|
||||||
|
toast("请选择地区")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (TextUtils.isEmpty(desc)) {
|
||||||
|
toast("请输入说明")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (imageAdapter.data.isEmpty()) {
|
||||||
|
toast("请上传宣传图")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
if (contactsAdapter.data.isEmpty()) {
|
||||||
|
toast("请添加联系人")
|
||||||
|
return@onClick
|
||||||
|
}
|
||||||
|
commit()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
override fun initObserve() {
|
||||||
|
super.initObserve()
|
||||||
|
mViewModel.addLiveData.observe(this) {
|
||||||
|
/*toast("提交成功")
|
||||||
|
RxBus.defaultInstance.post(SupplyEvent(from))
|
||||||
|
if (from == 1) {
|
||||||
|
PublicActivity.start(requireContext(), MySupplierFragment::class.java)
|
||||||
|
}
|
||||||
|
requireActivity().finish()*/
|
||||||
|
}
|
||||||
|
|
||||||
|
mViewModel.imageLiveData.observe(this) {
|
||||||
|
uploadedImgList.addAll(it)
|
||||||
|
imageAdapter.notifyDataSetChanged()
|
||||||
|
SpanUtils.with(binding.tvImageCount)
|
||||||
|
.append("(")
|
||||||
|
.append("${uploadedImgList.size}")
|
||||||
|
.setForegroundColor(getColor(R.color.color_ff493c))
|
||||||
|
.append("/5)")
|
||||||
|
.create()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun commit() {
|
||||||
|
val name = binding.etName.text.toString().trim()
|
||||||
|
val price = binding.etPrice.text.toString().trim()
|
||||||
|
val desc = binding.etExplain.text.toString().trim()
|
||||||
|
val jsonObject = JsonObject()
|
||||||
|
jsonObject.addProperty("type", "$goodsType")
|
||||||
|
jsonObject.addProperty("goods_name", name)
|
||||||
|
jsonObject.addProperty("goods_price", price)
|
||||||
|
jsonObject.addProperty("goods_price_type", "$priceType")
|
||||||
|
jsonObject.addProperty("goods_description", desc)
|
||||||
|
jsonObject.addProperty("city_id", "${city!!.id}")
|
||||||
|
|
||||||
|
val imageArray = JsonArray()
|
||||||
|
uploadedImgList.forEach {
|
||||||
|
imageArray.add(it.id)
|
||||||
|
}
|
||||||
|
jsonObject.add("file", imageArray)
|
||||||
|
|
||||||
|
val contactArray = JsonArray()
|
||||||
|
contactsAdapter.data.forEach {
|
||||||
|
val contactObj = JsonObject()
|
||||||
|
contactObj.addProperty("name", it.name)
|
||||||
|
contactObj.addProperty("phone", it.phone)
|
||||||
|
contactObj.addProperty("job", it.job)
|
||||||
|
contactArray.add(contactObj)
|
||||||
|
}
|
||||||
|
jsonObject.add("contact", contactArray)
|
||||||
|
|
||||||
|
if (goodsDetail == null) {
|
||||||
|
mViewModel.addGoods(jsonObject.toString().toRequestBody())
|
||||||
|
} else {
|
||||||
|
jsonObject.addProperty("id", goodsDetail!!.id)
|
||||||
|
mViewModel.updateGoods(jsonObject.toString().toRequestBody())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n", "NotifyDataSetChanged")
|
||||||
|
private fun setData(detail: SupplierGoodsBean) {
|
||||||
|
if (detail.status == "3") {
|
||||||
|
binding.tvReason.text = "理由:${detail.remark}"
|
||||||
|
binding.tvTime.text = detail.review_time
|
||||||
|
binding.layoutRejectReason.visible()
|
||||||
|
}
|
||||||
|
goodsType = detail.type
|
||||||
|
binding.tvType.text = if (detail.type == "1") "提供服务" else if (detail.type == "2") "提供产品" else "其他"
|
||||||
|
binding.rgPriceType.check(if (detail.goods_price_type == "1") R.id.rb_price1 else R.id.rb_price2)
|
||||||
|
binding.etName.setText(detail.goods_name)
|
||||||
|
binding.etPrice.setText(detail.goods_price)
|
||||||
|
binding.etExplain.setText(detail.goods_description)
|
||||||
|
|
||||||
|
city = UserConfigManager.getCityList().find { it.id == detail.city_id.toInt() }
|
||||||
|
if (city != null) binding.tvArea.text = city!!.name
|
||||||
|
|
||||||
|
val imageList = Gson().fromJson<List<UploadFileEntity>>(Gson().toJson(detail.file), object : TypeToken<List<UploadFileEntity>>(){}.type)
|
||||||
|
uploadedImgList.addAll(imageList)
|
||||||
|
imageAdapter.notifyDataSetChanged()
|
||||||
|
SpanUtils.with(binding.tvImageCount)
|
||||||
|
.append("(")
|
||||||
|
.append("${uploadedImgList.size}")
|
||||||
|
.setForegroundColor(getColor(R.color.color_ff493c))
|
||||||
|
.append("/5)")
|
||||||
|
.create()
|
||||||
|
|
||||||
|
contactsAdapter.setList(detail.contact)
|
||||||
|
if (contactsAdapter.data.size == 5) {
|
||||||
|
binding.ivAddContacts.gone()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun selectPhoto() {
|
||||||
|
EasyPhotos.createAlbum(this, true, false, GlideEngine.getInstance())
|
||||||
|
.setFileProviderAuthority(Constants.AppFilter)
|
||||||
|
.setCount(imageAdapter.selectMax - uploadedImgList.size)
|
||||||
|
.start(object : SelectCallback() {
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
override fun onResult(photos: ArrayList<Photo>, isOriginal: Boolean) {
|
||||||
|
if (photos.find { it.size > 10 * 1024 * 1024 } != null) {
|
||||||
|
toast("单张图片大小不能超过10M")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
mViewModel.imgList.clear()
|
||||||
|
mViewModel.upload(requireContext(), photos)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCancel() {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestroyView() {
|
||||||
|
binding.etExplain.removeTextChangedListener(textWatcher)
|
||||||
|
super.onDestroyView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
package com.cheng.bole.ui.fragment.bid.publish.goods
|
||||||
|
|
||||||
|
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 okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||||
|
import okhttp3.MultipartBody
|
||||||
|
import okhttp3.RequestBody
|
||||||
|
|
||||||
|
class PublishGoodsMessageViewModel: BaseViewModel() {
|
||||||
|
val addLiveData = MutableLiveData<Any>()
|
||||||
|
|
||||||
|
val imageLiveData = MutableLiveData<List<UploadFileEntity>>()
|
||||||
|
val imgList = ArrayList<UploadFileEntity>()
|
||||||
|
|
||||||
|
fun addGoods(requestBody: RequestBody) {
|
||||||
|
showDialog()
|
||||||
|
launchOnUiTryCatch({
|
||||||
|
val response = ApiFactory.apiService.addGoodsInfo(requestBody)
|
||||||
|
if (response.status) {
|
||||||
|
addLiveData.postValue(Any())
|
||||||
|
} else toast(response.message, true)
|
||||||
|
dismissDialog()
|
||||||
|
}, {
|
||||||
|
dismissDialog()
|
||||||
|
setError(it)
|
||||||
|
L.d(it)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateGoods(requestBody: RequestBody) {
|
||||||
|
showDialog()
|
||||||
|
launchOnUiTryCatch({
|
||||||
|
val response = ApiFactory.apiService.updateGoodsInfo(requestBody)
|
||||||
|
if (response.status) {
|
||||||
|
addLiveData.postValue(Any())
|
||||||
|
} else toast(response.message, true)
|
||||||
|
dismissDialog()
|
||||||
|
}, {
|
||||||
|
dismissDialog()
|
||||||
|
setError(it)
|
||||||
|
L.d(it)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除文件
|
||||||
|
fun deleteFile(id: String) {
|
||||||
|
launchOnUiTryCatch({
|
||||||
|
ApiFactory.apiService.delUserFile(id)
|
||||||
|
}, {
|
||||||
|
L.d(it)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun upload(context: Context, list: ArrayList<Photo>) {
|
||||||
|
showDialog()
|
||||||
|
list.forEachIndexed { index, photo ->
|
||||||
|
if (index == 0) {
|
||||||
|
uploadImg(context, photo) {
|
||||||
|
list.remove(photo)
|
||||||
|
if (list.isNotEmpty()) {
|
||||||
|
upload(context, list)
|
||||||
|
} else {
|
||||||
|
imageLiveData.postValue(imgList)
|
||||||
|
dismissDialog()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun uploadImg(context: Context, item: Photo, clickFun: () -> Unit) {
|
||||||
|
BitmapUtils.compressImg(context, item.path) {
|
||||||
|
launchOnUiTryCatch({
|
||||||
|
val requestFile = RequestBody.create("multipart/form-data".toMediaTypeOrNull(), it)
|
||||||
|
val filePart = MultipartBody.Part.createFormData("file", it.getName(), requestFile)
|
||||||
|
val response = ApiFactory.apiService.upload(filePart, "supply")
|
||||||
|
if (response.status) {
|
||||||
|
imgList.add(response.data)
|
||||||
|
clickFun.invoke()
|
||||||
|
} else {
|
||||||
|
toast(response.message, true)
|
||||||
|
dismissDialog()
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
dismissDialog()
|
||||||
|
L.d(it)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?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" />
|
||||||
|
<stroke android:color="@color/white" android:width="@dimen/dp_1"/>
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?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="#DDE2EB"
|
||||||
|
android:dashWidth="@dimen/dp_2"
|
||||||
|
android:dashGap="@dimen/dp_2" />
|
||||||
|
<corners android:radius="@dimen/dp_10" />
|
||||||
|
</shape>
|
||||||
|
|
@ -11,10 +11,10 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/dp_16"
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
android:text="选择类型"
|
android:text="选择类型"
|
||||||
android:textColor="@color/color_1a1a1a"
|
android:textColor="@color/color_222222"
|
||||||
android:textSize="@dimen/sp_16"
|
android:textSize="@dimen/sp_17"
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
<?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:fontFamily="sans-serif-medium"
|
||||||
|
android:text="已选择0人"
|
||||||
|
android:textColor="@color/color_222222"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
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" />
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/btn_add"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_46"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
android:drawableStart="@mipmap/ic_add_contacts"
|
||||||
|
android:drawablePadding="@dimen/dp_2"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="添加联系人"
|
||||||
|
android:textColor="@color/color_125ffe"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_10"
|
||||||
|
app:csb_drawablePosition="left"
|
||||||
|
app:csb_strokeColor="@color/color_125ffe"
|
||||||
|
app:csb_strokeWidth="@dimen/dp_1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/mRecyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_300"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/btn_add"
|
||||||
|
tools:listitem="@layout/listitem_contacts" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="#E8E8E8"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/mRecyclerView" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_bottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/dp_16"
|
||||||
|
android:paddingTop="@dimen/dp_9"
|
||||||
|
android:paddingEnd="@dimen/dp_16"
|
||||||
|
android:paddingBottom="@dimen/dp_30"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/mRecyclerView">
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_46"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="确定"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
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>
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
<?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:fontFamily="sans-serif-medium"
|
||||||
|
android:text="服务类型"
|
||||||
|
android:textColor="@color/color_222222"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
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.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/mRecyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintHeight_max="350dp"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_title"
|
||||||
|
tools:listitem="@layout/listitem_bid_type" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="#E8E8E8"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/mRecyclerView" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_bottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingStart="@dimen/dp_16"
|
||||||
|
android:paddingTop="@dimen/dp_9"
|
||||||
|
android:paddingEnd="@dimen/dp_16"
|
||||||
|
android:paddingBottom="@dimen/dp_30"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/mRecyclerView">
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_46"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="确定"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
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>
|
||||||
|
|
@ -0,0 +1,213 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
<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.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/mTitleBar">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:paddingStart="@dimen/dp_16"
|
||||||
|
android:paddingEnd="@dimen/dp_16">
|
||||||
|
|
||||||
|
<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_52"
|
||||||
|
android:layout_marginStart="@dimen/dp_68"
|
||||||
|
android:layout_marginTop="@dimen/dp_11"
|
||||||
|
android:background="@null"
|
||||||
|
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_toTopOf="parent" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="@color/color_eeeeee"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_contacts_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_contacts_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_contacts_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/et_phone"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_52"
|
||||||
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
|
android:background="@null"
|
||||||
|
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_contacts_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="@color/color_eeeeee"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_phone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_job_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_job"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/et_job" />
|
||||||
|
|
||||||
|
<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_job_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_job_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/et_job"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_52"
|
||||||
|
android:layout_marginStart="@dimen/dp_68"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="自定义职位(2-10字内)"
|
||||||
|
android:maxLength="10"
|
||||||
|
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_job_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_phone" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_job"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:layout_marginBottom="@dimen/dp_16"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_job"
|
||||||
|
app:spanCount="3"
|
||||||
|
tools:listitem="@layout/listitem_contacts_job" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_bottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:paddingStart="@dimen/dp_16"
|
||||||
|
android:paddingTop="@dimen/dp_9"
|
||||||
|
android:paddingEnd="@dimen/dp_16"
|
||||||
|
android:paddingBottom="@dimen/dp_30"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/btn_delete"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_46"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="删除"
|
||||||
|
android:textColor="@color/color_9a9ea7"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
android:layout_marginEnd="@dimen/dp_10"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_10"
|
||||||
|
app:csb_fillColor="@color/color_ebf5ff"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/btn_next"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_46"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="确定"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:csb_cornerRadius="@dimen/dp_10"
|
||||||
|
app:csb_fillColor="@color/color_125ffe"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/btn_delete"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,539 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/layout_bottom"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_container"
|
||||||
|
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_publish_bid_top_bg"
|
||||||
|
app:layout_constraintDimensionRatio="h,1125:804"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_desc"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_20"
|
||||||
|
android:layout_marginTop="96dp"
|
||||||
|
android:text="Hi,为了服务发布的真实性,\n请认真填写信息哦~"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_17"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<eightbitlab.com.blurview.BlurView
|
||||||
|
android:id="@+id/layout_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="168dp"
|
||||||
|
android:background="@drawable/shape_trans_top_line_cor20"
|
||||||
|
android:paddingStart="@dimen/dp_9"
|
||||||
|
android:paddingTop="@dimen/dp_13"
|
||||||
|
android:paddingEnd="@dimen/dp_9"
|
||||||
|
app:blurOverlayColor="#4DFFFFFF"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.lihang.ShadowLayout
|
||||||
|
android:id="@+id/layout_reject_reason"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:hl_cornerRadius="@dimen/dp_12"
|
||||||
|
app:hl_shadowColor="#0d4a4f5b"
|
||||||
|
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_16"
|
||||||
|
android:paddingEnd="@dimen/dp_12"
|
||||||
|
android:paddingBottom="@dimen/dp_16">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="已驳回"
|
||||||
|
android:textColor="@color/color_ff493c"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_reason"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:text="理由:图片不符合"
|
||||||
|
android:textColor="@color/color_999999"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_status" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="2025-07-29 12:14"
|
||||||
|
android:textColor="#ADADAD"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_status"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_status" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</com.lihang.ShadowLayout>
|
||||||
|
|
||||||
|
<com.lihang.ShadowLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:hl_cornerRadius="@dimen/dp_12"
|
||||||
|
app:hl_shadowColor="#0d4a4f5b"
|
||||||
|
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_16"
|
||||||
|
android:paddingEnd="@dimen/dp_12">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bid_info_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="发布信息"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<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/dp_15"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_bid_info_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_bid_info_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_type_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="类型"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_type"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_type" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_type"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_52"
|
||||||
|
android:layout_marginStart="@dimen/dp_68"
|
||||||
|
android:layout_marginTop="@dimen/dp_8"
|
||||||
|
android:drawableEnd="@mipmap/ic_arrow_dp18"
|
||||||
|
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_type_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_bid_info_title" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_line1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="@color/color_eeeeee"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_type" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="名称"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/et_name"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/et_name" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/et_name"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_52"
|
||||||
|
android:layout_marginStart="@dimen/dp_68"
|
||||||
|
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_eeeeee"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_price_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="价格"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_name" />
|
||||||
|
|
||||||
|
<RadioGroup
|
||||||
|
android:id="@+id/rg_price_type"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_68"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_price_title"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_price_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_price_title">
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_price1"
|
||||||
|
android:layout_width="@dimen/dp_18"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:checked="true"
|
||||||
|
android:background="@drawable/selector_rb"
|
||||||
|
android:button="@null" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_price1"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="价格"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"/>
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/rb_price2"
|
||||||
|
android:layout_width="@dimen/dp_18"
|
||||||
|
android:layout_height="@dimen/dp_18"
|
||||||
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
|
android:background="@drawable/selector_rb"
|
||||||
|
android:button="@null" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_price2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="自定义"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:layout_marginStart="@dimen/dp_10"/>
|
||||||
|
|
||||||
|
</RadioGroup>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/et_price"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_68"
|
||||||
|
android:background="@null"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:hint="请输入"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
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_price_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_price_title" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_unit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="元"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/et_price"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/et_price"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/et_price" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_line3"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:background="@color/color_eeeeee"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_price" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_area_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="发布地区"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_area"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_area" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_area"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_52"
|
||||||
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
|
android:background="@null"
|
||||||
|
android:drawableEnd="@mipmap/ic_arrow_dp18"
|
||||||
|
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_area_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/view_line3" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_line4"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:background="@color/color_eeeeee"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_area" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_contacts_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:text="联系方式"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/view_line4" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_contacts"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="@dimen/dp_52"
|
||||||
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
|
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_toStartOf="@id/iv_add_contacts"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_contacts_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/view_line4" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_add_contacts"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/ic_select_contacts"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_contacts_title"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_contacts_title" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_contacts"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
|
android:paddingTop="@dimen/dp_16"
|
||||||
|
android:paddingBottom="@dimen/dp_16"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/iv_add_contacts"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_contacts_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/view_line4"
|
||||||
|
tools:itemCount="1"
|
||||||
|
tools:listitem="@layout/listitem_publish_bid_contacts" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</com.lihang.ShadowLayout>
|
||||||
|
|
||||||
|
<com.lihang.ShadowLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:hl_cornerRadius="@dimen/dp_12"
|
||||||
|
app:hl_shadowColor="#0d4a4f5b"
|
||||||
|
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:paddingEnd="@dimen/dp_12"
|
||||||
|
android:paddingBottom="@dimen/dp_16">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_explain_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:drawablePadding="@dimen/dp_6"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="说明"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<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/dp_15"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_explain_title"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_explain_title" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatEditText
|
||||||
|
android:id="@+id/et_explain"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginTop="@dimen/dp_15"
|
||||||
|
android:background="@null"
|
||||||
|
android:gravity="start|top"
|
||||||
|
android:hint="输入的信息越全,查看的人越多哟~"
|
||||||
|
android:maxLength="500"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textColorHint="@color/color_bcbcbc"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:layout_constraintDimensionRatio="h,319:200"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_explain_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/500"
|
||||||
|
android:textColor="@color/color_999999"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/et_explain"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/et_explain" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_image_limit_tip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_6"
|
||||||
|
android:text="第一张图将作为缩略图"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/et_explain"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_image_count"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_2"
|
||||||
|
android:text="(0/5)"
|
||||||
|
android:textColor="@color/color_999999"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_image_limit_tip"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_image_limit_tip"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_image_limit_tip" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_images"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_7"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_image_limit_tip"
|
||||||
|
app:spanCount="5"
|
||||||
|
tools:itemCount="1"
|
||||||
|
tools:listitem="@layout/listitem_add_bid_img" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</com.lihang.ShadowLayout>
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_15" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</eightbitlab.com.blurview.BlurView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/layout_bottom"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:paddingStart="@dimen/dp_16"
|
||||||
|
android:paddingTop="@dimen/dp_9"
|
||||||
|
android:paddingEnd="@dimen/dp_16"
|
||||||
|
android:paddingBottom="@dimen/dp_30"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
|
|
||||||
|
<com.cheng.bole.widget.CommonShapeView
|
||||||
|
android:id="@+id/btn_next"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_46"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="提交"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_16"
|
||||||
|
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>
|
||||||
|
|
||||||
|
<com.example.base.widget.TitleBar
|
||||||
|
android:id="@+id/mTitleBar"
|
||||||
|
style="@style/Custom.TitleBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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>
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
|
android:background="@drawable/shape_dfdfdf_line_cor8"
|
||||||
android:src="@mipmap/ic_add_bid_image"
|
android:src="@mipmap/ic_add_bid_image"
|
||||||
app:layout_constraintBottom_toBottomOf="@id/iv_image"
|
app:layout_constraintBottom_toBottomOf="@id/iv_image"
|
||||||
app:layout_constraintEnd_toEndOf="@id/iv_image"
|
app:layout_constraintEnd_toEndOf="@id/iv_image"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="招标公告"
|
android:text="招标公告"
|
||||||
android:textColor="@color/color_666666"
|
android:textColor="@color/color_1a1a1a"
|
||||||
android:textSize="@dimen/sp_14"
|
android:textSize="@dimen/sp_14"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_check"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:src="@mipmap/ic_rb_checked"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_phone"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="15826433067"
|
||||||
|
android:textColor="@color/color_666666"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_check"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
|
android:text="郭女士 | 企业负责人"
|
||||||
|
android:textColor="@color/color_999999"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:layout_marginStart="@dimen/dp_40"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_check"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_phone" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/iv_edit"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:src="@mipmap/ic_edit_contacts"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_1"
|
||||||
|
android:layout_marginTop="@dimen/dp_16"
|
||||||
|
android:background="@color/color_eeeeee"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_name" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_34"
|
||||||
|
android:background="@drawable/shape_f6f6f6_cor25"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:text="企业负责人"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:textColor="@color/color_1a1a1a"
|
||||||
|
android:textSize="@dimen/sp_14"/>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -1,34 +1,28 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_52"
|
android:layout_height="wrap_content">
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_name"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_12"
|
|
||||||
android:text="郭女士"
|
|
||||||
android:textColor="@color/color_1a1a1a"
|
|
||||||
android:textSize="@dimen/sp_14" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_phone"
|
android:id="@+id/tv_phone"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
|
||||||
android:layout_marginEnd="@dimen/dp_10"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="15826433067"
|
android:text="15826433067"
|
||||||
android:textColor="@color/color_666666"
|
android:textColor="@color/color_666666"
|
||||||
android:textSize="@dimen/sp_14" />
|
android:textSize="@dimen/sp_14"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<TextView
|
||||||
android:id="@+id/iv_edit"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dp_12"
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
android:src="@mipmap/ic_edit_contacts" />
|
android:text="郭女士 | 企业负责人"
|
||||||
</LinearLayout>
|
android:textColor="@color/color_999999"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_phone" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/dp_12"
|
|
||||||
android:layout_marginEnd="@dimen/dp_12"
|
android:layout_marginEnd="@dimen/dp_12"
|
||||||
android:drawableStart="@mipmap/ic_pdf_attachment"
|
android:drawableStart="@mipmap/ic_pdf_attachment"
|
||||||
android:drawablePadding="@dimen/dp_12"
|
android:drawablePadding="@dimen/dp_12"
|
||||||
|
|
@ -28,7 +27,6 @@
|
||||||
android:id="@+id/iv_delete"
|
android:id="@+id/iv_delete"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/dp_12"
|
|
||||||
android:src="@mipmap/ic_delete"
|
android:src="@mipmap/ic_delete"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 970 B |
|
After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 708 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 798 B |
|
After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 842 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1002 B |
|
Before Width: | Height: | Size: 576 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 990 B |
|
Before Width: | Height: | Size: 877 B |
|
After Width: | Height: | Size: 534 B |
|
|
@ -88,5 +88,6 @@
|
||||||
<dimen name="dp_132">132dp</dimen>
|
<dimen name="dp_132">132dp</dimen>
|
||||||
<dimen name="dp_116">116dp</dimen>
|
<dimen name="dp_116">116dp</dimen>
|
||||||
<dimen name="dp_52">52dp</dimen>
|
<dimen name="dp_52">52dp</dimen>
|
||||||
|
<dimen name="dp_68">68dp</dimen>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||