如何更快地启动/启动 Android 风格的 Activity

发布于 2024-12-28 16:18:27 字数 381 浏览 2 评论 0原文

我正在以常规方式从广播接收器启动一个活动..(意图 -> StartActivity()..)

该活动的声明如下:

        <activity android:name=".AlertActivity"
         android:theme="@style/precall_alert_style" >

style/precall_alert_style 继承自 Theme.Dialog 并有 1 个重写项目。

该活动需要 1-2 秒才能显示!太多了.. 当我在活动之前启动祝酒时,活动开始正常...

如何减少这个时间?

I'm launching an activity from a broadcastreceiver in the regular way.. (Intent -> StartActivity()..)

The activity is delared like this:

        <activity android:name=".AlertActivity"
         android:theme="@style/precall_alert_style" >

style/precall_alert_style is inherited from Theme.Dialog and have 1 overridden item.

It take 1-2 secs to that activity to show up! It's too much..
when I launch a toast before the activity the activity starts ok...

How can I reduce this time?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文