Android的碎片onRestoreInstanceState [英] android fragment onRestoreInstanceState
本文介绍了Android的碎片onRestoreInstanceState的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我缺少的东西或做片段
不是有一个 onRestoreInstanceState()
的方法?如果不是,我怎么去实现类似的东西?
Am I missing something or do Fragment
s not have a onRestoreInstanceState()
method? If not, how do I go about attaining something similar?
推荐答案
片段没有一个 onRestoreInstanceState
方法。
您也可以达到同样的结果在 onActivityCreated
,它接收一个包与保存的实例状态(或空)。
You can achieve the same result in onActivityCreated
, which receives a bundle with the saved instance state (or null).
这里检查源$ C $ C 。
Check the source code here.
这篇关于Android的碎片onRestoreInstanceState的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文