I am using using ionic frame work.. How can i redirect to a particular page when clicking Android device Back button .. that is , There should make comparison of current page, and depending upon this comparison .. our back page is determining.. how it is possible???
我正在使用离子帧工作..如何在单击Android设备后退按钮时重定向到特定页面..也就是说,应该对当前页面进行比较,并根据此比较...我们的后页正在确定..怎么可能???
1 个解决方案
#1
2
You can override the onBackPressed()
method of Activity
您可以覆盖Activity的onBackPressed()方法
@Override
public void onBackPressed()
{
super.onBackPressed(); // optional depending on your needs
// code here to do whatever you want when back is pressed
}
#1
2
You can override the onBackPressed()
method of Activity
您可以覆盖Activity的onBackPressed()方法
@Override
public void onBackPressed()
{
super.onBackPressed(); // optional depending on your needs
// code here to do whatever you want when back is pressed
}