List View should not load onBackPressed

2020-01-20 04:56发布

I have Three Activities Main Activity , Order Activity , Order Details Activity.

Order Activity has a list view . On click of list View Order Details activity is opened but on back pressed from Order Details Activity the list view is loading again how to stop list view from loading Again

Please Help

1条回答
甜甜的少女心
2楼-- · 2020-01-20 04:58
@Override
protected void onResume() {
    //****put your list view setup you already create in oncreate() method
    super.onResume();
}

add bellow oncreate() method in main activity

查看更多
登录 后发表回答