Fragmenttabhost性能很慢? [英] Fragmenttabhost performance is slow?

查看:332
本文介绍了Fragmenttabhost性能很慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 V4支持的lib FragmentTabHost

要求是,当我切换标签彼此&安培;另外一个,就是叫

The requirement is that when I am switching tab one to another & another one, that is calling

onCreateView()及onActivityCreated()每次。

这就是为什么我的code性能很慢。

That's why my code performance is slow.

因此​​,任何其他解决方案?如何提高性能的片段标签?

So, any other solutions? how to increase performance in fragment tab?

推荐答案

我找到了一个解决方案。我插入的所有websevices和放大器;数据库事务code在上创建。因为在OnCreate中没有要求每一个直到的的OnDestroy不打电话的时间。 &放大器;另一种解决方案也可我们可以使用

I found a solution for that. I inserted all websevices & database transaction code in on create. because oncreate in not calling every time untill the ondestroy not call. & the other one solution is also available we can use

fragment.show();

fragment.show();

&放大器; fragment.hide();方法

& fragment.hide(); method

这篇关于Fragmenttabhost性能很慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆