2

我想知道如何获取 Tabhost 中所有现有选项卡的列表,以将它们的指标存储到列表中,当调用 onDestroy() 时,该列表将保存到 SharedPreferences(json 字符串格式)。

我问是因为我正在开发一个基于选项卡的内置多聊天应用程序,即使用户按下“返回”按钮,我也想保留打开的聊天列表......

提前致谢。

4

1 回答 1

1

I would like to know how to get list of all existing tabs within Tabhost to store their indicators to the List which will be saved to the SharedPreferences (json string format) when onDestroy() will be called.

When you call addTab() to add the tab to the TabHost, also keep track of your desired information yourself.

于 2012-10-29T21:13:52.680 回答