我缺少的东西或做片段
不是有一个 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.