[英]How to remove a Controller from the router backstack in Conductor?
I'm using Conductor and Mosby to implement MVP-MVC architecture in an android app. 我正在使用Conductor和Mosby在Android应用中实现MVP-MVC架构。
What I need to do is remove a Controller from the backstack of a router so that upon onBackPressed
that controller is no longer brought back up to the front. 我需要做的是从路由器的后备箱中删除一个控制器,以便在
onBackPressed
时onBackPressed
将该控制器带回到最前面。
If you want to remove current controller, do like @sockeqwe said: call router.popCurrentController()
. 如果要删除当前控制器,请像@sockeqwe所说的那样:调用
router.popCurrentController()
。
If you want to remove some specific controller from the backstack, you could try calling router.popController(your_controller)
. 如果要从后台删除某些特定的控制器,可以尝试调用
router.popController(your_controller)
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.