gpt4 book ai didi

android - 来自服务的 overridePendingTransition 给出错误

转载 作者:行者123 更新时间:2023-11-30 03:33:56 27 4
gpt4 key购买 nike

我正在尝试使用 overridePendingTransition 从服务启动一个 Intent ,它看起来像这样

    Intent dialogIntent = new Intent(this, PopUpMainActivity.class);
dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
this.startActivity(dialogIntent);
overridePendingTransition(R.anim.enter_anim, R.anim.exit_anim);

但是显示错误。

The method overridePendingTransition(int, int) is undefined for the type MyServiceForPopUp

最佳答案

很遗憾,您只能从 Activity 中调用 overridePendingTransition

更多信息在这里: https://groups.google.com/d/msg/android-porting/M42HBc90hz4/HXz7aY1KqlYJ

关于android - 来自服务的 overridePendingTransition 给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16932752/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com