以某种方式可以删除由trigger.io中的forge.event.backPressed.addListener添加的android后退按钮事件侦听器吗?据我所知,没有API方法。那么没有它可以做到这一点还是现在不行?
答案 0 :(得分:0)
你试过onBackPressed()吗?
@Override
public void onBackPressed() {
//super.onBackPressed();
if(SOME_CONDITION_TO_CHECK){
//THIS BLOCK WILL NOT DO ANYTHING AND WOULD DISABLE BACK BUTTON
}else{
super.onBackPressed();
//THIS BLOCK WILL BE CALLED IF ABOVE COND IS FALSE, AND WOULD ENABLE BACK BUTTON
}
}