English 中文(简体)
脱衣后恢复分离状态
原标题:Saving fragment UI state after detach called

我正在利用《巴拉行动》中的表格与律师事务所合作。 我在把塔巴点击事件换成表格时,目前正在处理我的活动中的塔巴点击事件,并在需要时使用FigmentManager。

我每次都随附着一个支离破碎的画面,都经过了整个生命周期,形成了一种新的观点,并重载了我的所有数据。 我正在使用独居的Instance State和已启动的Bundle,以更新核心内容(主要是名单的滚动位置)。

它是在大韩民国工作的,但有许多间接费用。 就我而言,名单可能有300份或300份记录,在改用表格时出现明显的拖延。

为了加快工作步伐,我现在在《意见》中挽救了作为阶级变量的根本观点。 接着,由于被附在我检验的碎片对我的根本看法没有价值,而不是重提观点,再次打上了《意见》。 这一节省的意见仍然有适当的数据集,我也绕过了这一情况下的数据。 当然,我仍然需要全面重建看法和数据,以便本组织在背景中消除分歧。

我的问题是,这种做法是否有效? 除非有记忆问题令人不安,否则我看不见。

最佳回答

它不是最佳办法,因此:

当你首先提出根本意见时,所有意见均采用<条码>代谢/代码>的背景。 如果这一<条码>活性已经销毁,那么你将试图将<条码>Fragment重新编号为<条码>的新例子,你将提出问题。

Secondly, it s a terrible use of memory to have a fully inflated root view sitting around when it s not being used. Now, the records you mention are not stored in any View, but rather your list view has a reference to an adapter you created, which is keeping that adapter in memory along with your views. That is a lot of data to just have sitting around.

现在要适当给你一个建议,你最终必须在记忆使用和业绩之间划线,同时铭记,如果你计划公布这一信息,就会有低劣的硬件装置。

一种选择是,你已经做了些什么,即使用<条码>已过时的InstanceState。 偏离顺序时变量。 您可尝试将你的300份记录列入<条码>Bundle,并看看这些记录是如何运作的。 如果数据是你创建的类别,则执行<条码> 可使用<>条码>接口(见 rel=“nofollow”>documentation,以了解如何适当实施这一点,并将之储存在<条码>Bundle上,然后检索,并创建新的适应者。 我将非常建议不要提及<代码>。 附录/编码。

问题回答

暂无回答




相关问题
How to start to create an application GUI using C#?

HI! I am new to C# and plan to use it for my application GUI. I am trying to make my GUI similar to SPSS:http://www.spss.com/images/08/statistics_screens/ez_rfm-big.jpg Is this easy in C#? Is there ...

Automatic height of edit box

My shoes application has three items stacked on top of each other (with a stack, of course), in order: A banner An edit box Two buttons in a flow What I want to do is have the banner stay at it s ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

UI And TcpClient Issue in vb.net

I m having some problems with a small ircbot i m writing. Basically I connect to the server using a tcpclient in a seperate class, which also runs on its own thread. I want to display the server text ...

UI Convention: Shortcut key for application exit? [closed]

Is there a convention for the shortcut keys for application exit? Some applications uses Alt+X some others use Ctrl+ X and Ctrl+Q. Applications like FF and IE doesnot assign a shortcut at all. So is ...

热门标签