Commit 6ebd2599 by Wyh

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

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