使用离子框架单击Android设备后退按钮时,如何重定向到特定页面

时间:2014-07-11 09:43:07

标签: android angularjs ionic-framework

我正在使用离子帧工作..如何在点击Android设备后退按钮时重定向到特定页面..也就是说,应该对当前页面进行比较,并根据此比较...我们的后页是确定..怎么可能???

1 个答案:

答案 0 :(得分:2)

您可以覆盖onBackPressed()

Activity方法
@Override
public void onBackPressed()
{

     super.onBackPressed();  // optional depending on your needs
  // code here to do whatever you want when back is pressed
}