How to navigate up to the same parent state

前端 未结 5 663
清歌不尽
清歌不尽 2020-12-02 13:08

From my observation from Gmail and TED app the behavior of up navigation it will navigate to parent with the same state (scroll position) not like what Google say in their d

5条回答
  •  广开言路
    2020-12-02 14:06

    You would need to save the state on the parent activity and recover it after returning from the calling one.

    See Saving Android Activity state using Save Instance State for a complete explanation of the preocess, with code.

提交回复
热议问题