Commit e0e28792 authored by yinjiacheng's avatar yinjiacheng

update 统一通用TopBar、通用TopBar支持设置横向内边距

parent a0a7f777
...@@ -8,6 +8,7 @@ import androidx.core.content.ContextCompat ...@@ -8,6 +8,7 @@ import androidx.core.content.ContextCompat
import androidx.core.view.isVisible import androidx.core.view.isVisible
import com.yidian.bcommon.R import com.yidian.bcommon.R
import com.yidian.bcommon.databinding.ViewCommonTopBarBinding import com.yidian.bcommon.databinding.ViewCommonTopBarBinding
import com.yidian.utils.DensityUtil
import com.yidian.xpage.XPageManager import com.yidian.xpage.XPageManager
/** /**
...@@ -43,27 +44,50 @@ class CommonTopBarView @JvmOverloads constructor( ...@@ -43,27 +44,50 @@ class CommonTopBarView @JvmOverloads constructor(
init { init {
val typeArray = context.obtainStyledAttributes(attrs, R.styleable.CommonTopBarView) val typeArray = context.obtainStyledAttributes(attrs, R.styleable.CommonTopBarView)
viewBinding.tvTitle.text = // 设置标题文字
typeArray.getText(R.styleable.CommonTopBarView_CommonTopBarView_title_text) viewBinding.tvTitle.text = typeArray.getText(R.styleable.CommonTopBarView_CommonTopBarView_title_text) ?: ""
typeArray.getText(R.styleable.CommonTopBarView_CommonTopBarView_action_text)?.let { // 设置标题文字颜色
if (it.isNotEmpty()) visibility = View.VISIBLE viewBinding.tvTitle.setTextColor(
viewBinding.tvAction.text = it typeArray.getColor(
} R.styleable.CommonTopBarView_CommonTopBarView_title_text_color,
typeArray.getColor(R.styleable.CommonTopBarView_CommonTopBarView_bg_color, ContextCompat.getColor(context, R.color.transparent)).let { ContextCompat.getColor(context, R.color.color_333333)
viewBinding.root.setBackgroundColor(it) )
} )
typeArray.getColor(R.styleable.CommonTopBarView_CommonTopBarView_title_text_color, ContextCompat.getColor(context, R.color.color_333333)).let { // 设置操作文字
viewBinding.tvTitle.setTextColor(it) val action = typeArray.getText(R.styleable.CommonTopBarView_CommonTopBarView_action_text) ?: ""
} viewBinding.tvAction.isVisible = action.isNotEmpty()
typeArray.getResourceId(R.styleable.CommonTopBarView_CommonTopBarView_back_img, R.drawable.icon_back).let { viewBinding.tvAction.text = action
viewBinding.ivBack.setImageResource(it) // 设置背景色
} viewBinding.root.setBackgroundColor(
typeArray.getColor(
R.styleable.CommonTopBarView_CommonTopBarView_bg_color,
ContextCompat.getColor(context, R.color.transparent)
)
)
// 设置返回按钮图标
viewBinding.ivBack.setImageResource(
typeArray.getResourceId(
R.styleable.CommonTopBarView_CommonTopBarView_back_img,
R.drawable.icon_back
)
)
// 设置横向内边距
val horizontalPadding =
typeArray.getDimensionPixelOffset(R.styleable.CommonTopBarView_CommonTopBarView_padding_horizontal, DensityUtil.dp2px(20F))
setPadding(horizontalPadding, 0, horizontalPadding, 0)
typeArray.recycle() typeArray.recycle()
viewBinding.ivBack.setOnClickListener(this) viewBinding.ivBack.setOnClickListener(this)
viewBinding.tvAction.setOnClickListener(this) viewBinding.tvAction.setOnClickListener(this)
} }
/**
* 设置title
*/
fun setTitle(title: String) {
viewBinding.tvTitle.text = title
}
/** /**
* 设置返回按钮是否可见 * 设置返回按钮是否可见
*/ */
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp44" android:layout_height="@dimen/dp44">
android:paddingStart="@dimen/dp20"
android:paddingEnd="@dimen/dp20">
<ImageView <ImageView
android:id="@+id/iv_back" android:id="@+id/iv_back"
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
<attr name="CommonTopBarView_title_text_color" format="color" /> <attr name="CommonTopBarView_title_text_color" format="color" />
<!--返回按钮图标--> <!--返回按钮图标-->
<attr name="CommonTopBarView_back_img" format="reference" /> <attr name="CommonTopBarView_back_img" format="reference" />
<!--横向内边距-->
<attr name="CommonTopBarView_padding_horizontal" format="dimension" />
</declare-styleable> </declare-styleable>
<declare-styleable name="CommonEmptyPageView"> <declare-styleable name="CommonEmptyPageView">
<attr name="CommonEmptyPageView_place_holder_img" format="reference" /> <attr name="CommonEmptyPageView_place_holder_img" format="reference" />
......
...@@ -67,7 +67,6 @@ class LifeAccountCreateActivity : BaseActivity<ActivityLifeAccountCreateBinding> ...@@ -67,7 +67,6 @@ class LifeAccountCreateActivity : BaseActivity<ActivityLifeAccountCreateBinding>
} }
private fun initListener() { private fun initListener() {
viewBind.ivBack.setOnClickListener { XPageManager.pop(null) }
viewBind.etAccount.addTextChangedListener(object : TextWatcherAdapter() { viewBind.etAccount.addTextChangedListener(object : TextWatcherAdapter() {
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
if (s == null) return if (s == null) return
......
...@@ -5,6 +5,7 @@ import android.view.View ...@@ -5,6 +5,7 @@ import android.view.View
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.yidian.bcommon.constant.XRouterPathConstants import com.yidian.bcommon.constant.XRouterPathConstants
import com.yidian.bcommon.base.BaseActivity import com.yidian.bcommon.base.BaseActivity
import com.yidian.bcommon.widget.CommonTopBarView
import com.yidian.shenghuoquan.bmanagercenter.R import com.yidian.shenghuoquan.bmanagercenter.R
import com.yidian.shenghuoquan.bmanagercenter.adapter.BottomSelectAdapter import com.yidian.shenghuoquan.bmanagercenter.adapter.BottomSelectAdapter
import com.yidian.shenghuoquan.bmanagercenter.bean.BottomSelectBean import com.yidian.shenghuoquan.bmanagercenter.bean.BottomSelectBean
...@@ -20,7 +21,6 @@ import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthIndividualBusine ...@@ -20,7 +21,6 @@ import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthIndividualBusine
import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthMerchantCheckBean import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthMerchantCheckBean
import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.BottomSelectDialog
import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager
import com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthProcessView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthProcessView
import com.yidian.xpage.XPageManager import com.yidian.xpage.XPageManager
......
...@@ -68,9 +68,6 @@ class LifeAccountIdentityActivity : BaseActivity<ActivityLifeAccountIdentityBind ...@@ -68,9 +68,6 @@ class LifeAccountIdentityActivity : BaseActivity<ActivityLifeAccountIdentityBind
} }
private fun onClickListener() { private fun onClickListener() {
viewBind.back.setOnClickListener {
XPageManager.pop(null)
}
viewBind.tvEnterLifeAccount.setOnClickListener { viewBind.tvEnterLifeAccount.setOnClickListener {
LifeAccountManager.saveLifeAccountId(curSelectedItem.life_account_id) LifeAccountManager.saveLifeAccountId(curSelectedItem.life_account_id)
// 进入商户管理中心页 // 进入商户管理中心页
......
...@@ -13,6 +13,7 @@ import com.yidian.bcommon.sdk.ClientType ...@@ -13,6 +13,7 @@ import com.yidian.bcommon.sdk.ClientType
import com.yidian.bcommon.sdk.JudgeClientUtils import com.yidian.bcommon.sdk.JudgeClientUtils
import com.yidian.bcommon.services.ZapServiceActionConstants import com.yidian.bcommon.services.ZapServiceActionConstants
import com.yidian.bcommon.services.ZapServiceNameConstants import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.bcommon.widget.CommonTopBarView
import com.yidian.bcommon.widget.dialog.HintDialog import com.yidian.bcommon.widget.dialog.HintDialog
import com.yidian.shenghuoquan.bmanagercenter.R import com.yidian.shenghuoquan.bmanagercenter.R
import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountPersonalAuthBinding import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountPersonalAuthBinding
...@@ -21,7 +22,6 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.IAuthPersonalComplet ...@@ -21,7 +22,6 @@ import com.yidian.shenghuoquan.bmanagercenter.http.callback.IAuthPersonalComplet
import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthAuthenticationBean import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthAuthenticationBean
import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthPersonalCompleteBean import com.yidian.shenghuoquan.bmanagercenter.http.httpbean.AuthPersonalCompleteBean
import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager
import com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView
import com.yidian.xarc.xevent.XBaseEvent import com.yidian.xarc.xevent.XBaseEvent
import com.yidian.xarc.xevent.XEventManager import com.yidian.xarc.xevent.XEventManager
import com.yidian.xpage.XPageManager import com.yidian.xpage.XPageManager
......
...@@ -10,7 +10,7 @@ import com.yidian.shenghuoquan.bmanagercenter.constant.Constant ...@@ -10,7 +10,7 @@ import com.yidian.shenghuoquan.bmanagercenter.constant.Constant
import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountModifyNameBinding import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityLifeAccountModifyNameBinding
import com.yidian.shenghuoquan.bmanagercenter.http.ApiService import com.yidian.shenghuoquan.bmanagercenter.http.ApiService
import com.yidian.bcommon.utils.InputFilterUtil import com.yidian.bcommon.utils.InputFilterUtil
import com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView import com.yidian.bcommon.widget.CommonTopBarView
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountAuthIdentityInfoEditView
import com.yidian.xarc.xevent.XBaseEvent import com.yidian.xarc.xevent.XBaseEvent
import com.yidian.xarc.xevent.XEventManager import com.yidian.xarc.xevent.XEventManager
......
...@@ -18,6 +18,7 @@ import com.yidian.bcommon.sdk.JudgeClientUtils ...@@ -18,6 +18,7 @@ import com.yidian.bcommon.sdk.JudgeClientUtils
import com.yidian.bcommon.services.ZapServiceActionConstants import com.yidian.bcommon.services.ZapServiceActionConstants
import com.yidian.bcommon.services.ZapServiceNameConstants import com.yidian.bcommon.services.ZapServiceNameConstants
import com.yidian.bcommon.widget.CommonHintDialog import com.yidian.bcommon.widget.CommonHintDialog
import com.yidian.bcommon.widget.CommonTopBarView
import com.yidian.shenghuoquan.bmanagercenter.R import com.yidian.shenghuoquan.bmanagercenter.R
import com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceFunctionAdapter import com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceFunctionAdapter
import com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceGroupAdapter import com.yidian.shenghuoquan.bmanagercenter.adapter.MerchantServiceGroupAdapter
...@@ -31,7 +32,6 @@ import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager ...@@ -31,7 +32,6 @@ import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager
import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountAuthActivity import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountAuthActivity
import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountEnterpriseAuthActivity import com.yidian.shenghuoquan.bmanagercenter.ui.auth.LifeAccountEnterpriseAuthActivity
import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.MerchantCenterBottomHintDialog import com.yidian.shenghuoquan.bmanagercenter.ui.dialog.MerchantCenterBottomHintDialog
import com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView
import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountTitleView import com.yidian.shenghuoquan.bmanagercenter.widget.LifeAccountTitleView
import com.yidian.shenghuoquan.bmanagercenter.widget.MerchantAssetView import com.yidian.shenghuoquan.bmanagercenter.widget.MerchantAssetView
import com.yidian.utils.ToastUtil import com.yidian.utils.ToastUtil
......
...@@ -8,10 +8,10 @@ import com.yidian.bcommon.base.BaseActivity ...@@ -8,10 +8,10 @@ import com.yidian.bcommon.base.BaseActivity
import com.yidian.bcommon.extensions.hideKeyBoard import com.yidian.bcommon.extensions.hideKeyBoard
import com.yidian.bcommon.utils.EditTextUtils import com.yidian.bcommon.utils.EditTextUtils
import com.yidian.bcommon.utils.ToastUtils import com.yidian.bcommon.utils.ToastUtils
import com.yidian.bcommon.widget.CommonTopBarView
import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityStoreEditBinding import com.yidian.shenghuoquan.bmanagercenter.databinding.ActivityStoreEditBinding
import com.yidian.shenghuoquan.bmanagercenter.http.ApiService import com.yidian.shenghuoquan.bmanagercenter.http.ApiService
import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager import com.yidian.shenghuoquan.bmanagercenter.manager.LifeAccountManager
import com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView
/** /**
* 新增/编辑门店 * 新增/编辑门店
...@@ -35,12 +35,12 @@ class EditStoreActivity : BaseActivity<ActivityStoreEditBinding>(), CommonTopBar ...@@ -35,12 +35,12 @@ class EditStoreActivity : BaseActivity<ActivityStoreEditBinding>(), CommonTopBar
when (it.getSerializableExtra("from")) { when (it.getSerializableExtra("from")) {
fromAddStore -> { fromAddStore -> {
isAddStore = true isAddStore = true
viewBind.bvTopBar.setPageTitle("新建门店") viewBind.bvTopBar.setTitle("新建门店")
initContent() initContent()
} }
fromEditStore -> { fromEditStore -> {
isAddStore = false isAddStore = false
viewBind.bvTopBar.setPageTitle("编辑门店") viewBind.bvTopBar.setTitle("编辑门店")
initContent(it) initContent(it)
} }
} }
......
package com.yidian.shenghuoquan.bmanagercenter.widget
import android.content.Context
import android.util.AttributeSet
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
import com.yidian.shenghuoquan.bmanagercenter.R
import com.yidian.shenghuoquan.bmanagercenter.databinding.ViewCommonTopBarBinding
import com.yidian.xpage.XPageManager
/**
* author: yinjiacheng
* date: 6/14/21 12:58 AM
* description: 顶部栏
*/
class CommonTopBarView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyle: Int = 0
) : ConstraintLayout(context, attrs, defStyle), View.OnClickListener {
private val viewBinding by lazy {
ViewCommonTopBarBinding.bind(
View.inflate(
getContext(),
R.layout.view_common_top_bar,
this
)
)
}
/**
* 返回按钮点击回调
*/
private var backCallback: OnCommonTopBarBackCallback? = null
/**
* 操作按钮点击回调
*/
private var actionCallback: OnCommonTopBarActionCallback? = null
init {
val typeArray = context.obtainStyledAttributes(attrs, R.styleable.CommonTopBarView)
viewBinding.tvTitle.text =
typeArray.getText(R.styleable.CommonTopBarView_CommonTopBarView_title_text)
typeArray.getText(R.styleable.CommonTopBarView_CommonTopBarView_action_text)?.let {
if (it.isNotEmpty()) visibility = View.VISIBLE
viewBinding.tvAction.text = it
}
typeArray.recycle()
viewBinding.ivBack.setOnClickListener(this)
viewBinding.tvAction.setOnClickListener(this)
}
/**
* 设置title
*/
fun setPageTitle(title: String) {
viewBinding.tvTitle.text = title
}
/**
* 设置返回按钮是否可见
*/
fun setBackVisibility(isVisible: Boolean) {
viewBinding.ivBack.isVisible = isVisible
}
/**
* 设置操作按钮是否可见
*/
fun setActionVisibility(isVisible: Boolean) {
viewBinding.tvAction.isVisible = isVisible
}
/**
* 设置操作按钮是否可用
*/
fun setActionEnable(isEnable: Boolean) {
viewBinding.tvAction.isEnabled = isEnable
viewBinding.tvAction.alpha = if (isEnable) 1f else 0.4f
}
override fun onClick(v: View?) {
if (v?.id == R.id.iv_back) {
// 若没有设置返回点击回调则默认pop
backCallback?.onDoBack() ?: XPageManager.pop(null)
} else if (v?.id == R.id.tv_action) {
actionCallback?.onDoAction()
}
}
/**
* 设置回调
* @param backCallback 返回按钮点击回调
* @param actionCallback 操作按钮点击回调
*/
fun setOnCommonTopBarCallback(backCallback: OnCommonTopBarBackCallback?, actionCallback: OnCommonTopBarActionCallback?) {
this.backCallback = backCallback
this.actionCallback = actionCallback
}
interface OnCommonTopBarActionCallback {
/**
* 操作按钮回调
*/
fun onDoAction()
}
interface OnCommonTopBarBackCallback {
/**
* 返回按钮回调
*/
fun onDoBack()
}
}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="@color/color_FFFFFFFF" android:background="@color/color_FFFFFFFF"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout 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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
...@@ -11,30 +12,11 @@ ...@@ -11,30 +12,11 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<FrameLayout <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="44dp"> android:layout_height="wrap_content"
app:CommonTopBarView_title_text="@string/account_title" />
<ImageView
android:id="@+id/iv_back"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="20dp"
android:scaleType="centerCrop"
android:src="@drawable/icon_back"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/account_title"
android:textColor="@color/gray_333"
android:textSize="18sp"
android:textStyle="bold" />
</FrameLayout>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="@color/color_FFFFFFFF" android:background="@color/color_FFFFFFFF"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="@color/white" android:background="@color/white"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="@color/color_FFFFFFFF" android:background="@color/color_FFFFFFFF"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -11,36 +11,12 @@ ...@@ -11,36 +11,12 @@
android:layout_marginBottom="95dp" android:layout_marginBottom="95dp"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="44dp">
<ImageButton
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:background="@null"
android:paddingStart="20dp"
android:scaleType="fitCenter"
android:src="@drawable/selector_big_back_black_button"
android:visibility="gone"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="#333333"
android:textSize="18sp" />
</RelativeLayout>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="87dp" android:layout_height="87dp"
android:layout_marginStart="30dp" android:layout_marginStart="30dp"
android:layout_marginEnd="16dp"> android:layout_marginEnd="16dp"
android:layout_marginTop="@dimen/dp44">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:background="@color/white"> android:background="@color/white">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="@color/white" android:background="@color/white"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="@color/color_FFFFFFFF" android:background="@color/color_FFFFFFFF"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="@color/color_FFFFFFFF" android:background="@color/color_FFFFFFFF"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
android:background="#FFF5F6F7" android:background="#FFF5F6F7"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:orientation="vertical"> android:orientation="vertical">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
android:orientation="vertical"> android:orientation="vertical">
<com.yidian.shenghuoquan.bmanagercenter.widget.CommonTopBarView <com.yidian.bcommon.widget.CommonTopBarView
android:id="@+id/bv_top_bar" android:id="@+id/bv_top_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/dp44"
android:paddingStart="@dimen/dp20"
android:paddingEnd="@dimen/dp20">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/dp28"
android:layout_height="@dimen/dp28"
android:src="@drawable/icon_back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp18"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/color_FF1852F1"
android:textSize="@dimen/sp14"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -24,9 +24,4 @@ ...@@ -24,9 +24,4 @@
<attr name="MerchantInfoView_name_text" format="string" /> <attr name="MerchantInfoView_name_text" format="string" />
</declare-styleable> </declare-styleable>
<declare-styleable name="CommonTopBarView">
<attr name="CommonTopBarView_title_text" format="string" />
<attr name="CommonTopBarView_action_text" format="string" />
</declare-styleable>
</resources> </resources>
\ No newline at end of file
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
app:CommonTopBarView_bg_color="@color/color_FD7823" app:CommonTopBarView_bg_color="@color/color_FD7823"
app:CommonTopBarView_title_text="@string/order_detail" app:CommonTopBarView_title_text="@string/order_detail"
app:CommonTopBarView_title_text_color="@color/white" app:CommonTopBarView_title_text_color="@color/white"
app:CommonTopBarView_padding_horizontal="@dimen/dp10"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.scwang.smart.refresh.layout.SmartRefreshLayout <com.scwang.smart.refresh.layout.SmartRefreshLayout
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
app:CommonTopBarView_bg_color="@color/color_FD7823" app:CommonTopBarView_bg_color="@color/color_FD7823"
app:CommonTopBarView_title_text="@string/select_pickup_point" app:CommonTopBarView_title_text="@string/select_pickup_point"
app:CommonTopBarView_title_text_color="@color/white" app:CommonTopBarView_title_text_color="@color/white"
app:CommonTopBarView_padding_horizontal="@dimen/dp10"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.yidian.shenghuoquan.border.ui.widget.PickupPointSearchView <com.yidian.shenghuoquan.border.ui.widget.PickupPointSearchView
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment