与通知栏和操作栏的全屏幕活动和1之间平滑过渡 [英] Smooth transition between full-screen-activity and one with notification-bar and action bar

查看:339
本文介绍了与通知栏和操作栏的全屏幕活动和1之间平滑过渡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有2个活动的应用程序:

I have an app that has 2 activities :


  • 飞溅的活动,这是在全屏显示(无操作栏,没有通知栏)

  • 主要活动,其中有两个动作条(使用actionBarSherlock)和通知栏。

由于某些原因,从第一个活动到第二个去的时候,有一个神经质的布局过程中,显示​​了第二个活动无操作栏和通知栏的内容,片刻之后就说明他们俩

For some reason, when going from the first activity to the second, there is a "jumpy" layout process , which shows the content of the second activity without the action bar and notification bar, and a moment later it shows them both.

这导致下面的内容到移动过,这是非常明显的。

This causes the content below to move too, which is very noticeable.

正如我所看到的,一个可能的解决方案是隐藏操作栏和稍后(后500毫秒)表现出来,但是这似乎是一个坏的解决方案(使其速度较慢,躲在毫无理由地),再加上我需要获得用于其他​​目的的动作条项目位置(用于显示教程)。

As I've seen, a possible solution would be to hide the action bar and show it a bit later (500ms later), but this seems like a bad solution (making it slower and hiding for no reason) , plus i need to get the actionBar items positions for another purpose (for showing a tutorial).

是否有可能避免jumpyness?一,不涉及这样一个怪异的解决办法?

Is it possible to avoid the "jumpyness" ? One that doesn't involve such a weird workaround ?

推荐答案

我有解决我的问题做以下内容:

1:我得的优化所有屏幕其中AB被证明。在某些情况下,我使用的是不是正确实施列表视图,并导致在活动明显的加载时间。

1.- I have to optimize all the screens where the AB was shown. In some cases I used ListViews which weren't correctly implemented and that caused a noticeable load time in the activity.

2:我的显示在状态栏开始新的活动之前。我的意思是:我刚开始非全屏的人之前曾表示全屏活动状态栏。与我取得的第二个活动的布局(非全屏)从未调整。

2.- I have shown the status bar BEFORE starting the new activity. I mean: I've shown the status bar in the fullscreen activity just before starting the non-fullscreen one. With that I achieved that the layout of the second activity (non-fullscreen) was never resized.

通过这两个小的变化,现在的AB过渡更加平滑。

With this two little changes now the AB transition is much more smoother.

您可以找到我的答案在在整个后:<一href=\"http://stackoverflow.com/questions/20238216/smoother-transition-from-fullscreen-activity-using-actionbarsherlock\">Smoother使用ActionBarSherlock 全屏活性转换

You can find the complete post with my answer at: Smoother transition from fullscreen activity using ActionBarSherlock

这篇关于与通知栏和操作栏的全屏幕活动和1之间平滑过渡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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