简体   繁体   English

Android在首选项片段中按下后退按钮时会调用什么方法

[英]Android what method is called when back button is pushed in a Preference Fragment

I have a preference fragment and it has an option to open another preference fragment that allows the user to select contacts. 我有一个首选项片段,它有一个选项可以打开另一个首选项片段,允许用户选择联系人。 When I push the back button the values in the first preference fragment don't refresh. 当我按下后退按钮时,第一个首选项片段中的值不会刷新。 What method is invoked when I press the back button? 当我按下返回按钮时,调用什么方法?

如果我对您的理解很好,那么您想覆盖onBackPressed()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM