Undo the changes in listview onbackpressed

 ̄綄美尐妖づ 提交于 2019-12-02 09:43:15

There a simple way to achieve this

let's say you have a Product class

public class Product{
    private boolean currentState;
    private boolean previosState;
}

Maintain the currentState when user clicks on the cross button but do not touch the previousState.

Now on the yes or no selection when press Yes consider the currentState and when press No consider the previosState.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!