Commit 6ebd2599 by Wyh

外送/自取未配置功能權限時,不顯示右上角的三個點

Signed-off-by: Wyh <1239658231>
parent 5064a31b
......@@ -513,37 +513,40 @@ class DeliveryOrderMainActivity : BaseActivity<IPresenter>(), View.OnClickListen
qm_other_order_bar.setTitle(GsaCloudApplication.getRestaurantName())
qm_other_order_bar.addLeftImageButton(R.drawable.icon_return, R.id.iv_left_back).setOnClickListener { finish() }
qm_other_order_bar.addRightImageButton(R.drawable.icon_topbar_overflow, R.id.topbar_right_change_button).setOnClickListener {
//彈出彈窗
if (pop == null) {
val view = LayoutInflater.from(this).inflate(R.layout.layout_more_popup, null)
pop = QMUIPopups.popup(this)
.preferredDirection(QMUIPopup.DIRECTION_BOTTOM)
.view(view)
.radius(QMUIDisplayHelper.dp2px(this, 5))
.arrow(true)
.shadow(true)
.dimAmount(0.6f)
.offsetYIfTop(0)
.animStyle(QMUIPopup.ANIM_AUTO)
.show(it)
view.findViewById<QMUIAlphaTextView>(R.id.tv_delivery_setting).setOnClickListener(this)
val mTvHistoryOrder = view.findViewById<QMUIAlphaTextView>(R.id.tv_history_order)
mTvHistoryOrder.setState(historyOrderFunction != null)
mTvHistoryOrder.setOnClickListener(this)
val mTvOpenCashBox = view.findViewById<QMUIAlphaTextView>(R.id.tv_open_cash_box);
mTvOpenCashBox.setOnClickListener(this)
mTvOpenCashBox.setState(openCashBoxFunction != null)
view.findViewById<QMUIAlphaTextView>(R.id.tv_check_log).setOnClickListener(this)
val tvNewOrder = view.findViewById<QMUIAlphaTextView>(R.id.tv_new_order);
tvNewOrder.setState(newOrderFunction != null)
tvNewOrder.setOnClickListener(this)
} else {
pop!!.show(it)
if (newOrderFunction != null || historyOrderFunction != null || openCashBoxFunction != null) {
qm_other_order_bar.addRightImageButton(R.drawable.icon_topbar_overflow, R.id.topbar_right_change_button).setOnClickListener {
//彈出彈窗
if (pop == null) {
val view = LayoutInflater.from(this).inflate(R.layout.layout_more_popup, null)
pop = QMUIPopups.popup(this)
.preferredDirection(QMUIPopup.DIRECTION_BOTTOM)
.view(view)
.radius(QMUIDisplayHelper.dp2px(this, 5))
.arrow(true)
.shadow(true)
.dimAmount(0.6f)
.offsetYIfTop(0)
.animStyle(QMUIPopup.ANIM_AUTO)
.show(it)
view.findViewById<QMUIAlphaTextView>(R.id.tv_delivery_setting).setOnClickListener(this)
val mTvHistoryOrder = view.findViewById<QMUIAlphaTextView>(R.id.tv_history_order)
mTvHistoryOrder.setState(historyOrderFunction != null)
mTvHistoryOrder.setOnClickListener(this)
val mTvOpenCashBox = view.findViewById<QMUIAlphaTextView>(R.id.tv_open_cash_box);
mTvOpenCashBox.setOnClickListener(this)
mTvOpenCashBox.setState(openCashBoxFunction != null)
view.findViewById<QMUIAlphaTextView>(R.id.tv_check_log).setOnClickListener(this)
val tvNewOrder = view.findViewById<QMUIAlphaTextView>(R.id.tv_new_order);
tvNewOrder.setState(newOrderFunction != null)
tvNewOrder.setOnClickListener(this)
} else {
pop!!.show(it)
}
}
}
ivDisconnectView = qm_other_order_bar.addRightImageButton(R.drawable.ic_heart_disconnect, R.id.topbar_heart_disconnect)
......
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