Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有内置方法来检测用户在 Android 中的 Activity 上所做的任何数据更改?
当用户打开活动但没有更改任何内容但点击“保存”按钮时,我想阻止保存并同步到服务器。
提前谢谢你的帮助,
文西
您可以在代码中维护布尔值,以检查是否在活动中的任何位置发生了触摸或单击等操作,然后在单击保存按钮时,您可以比较这些布尔值并决定是否上传。