【发布时间】:2016-06-19 21:47:33
【问题描述】:
我设置了一个闹钟来显示对应的Notification。 Notification 的 PendingIntent 用于启动 Gluon App 主类。为了显示除 homeView 之外的 View,我在 postInit 方法中调用 switchView(otherView)。显示了 OtherView,但没有 AppBar。虽然可以让AppBar 出现,但我想知道这是否是正确的方法。
@Override
public void postInit(Scene scene) {
// additional setUp logic
boolean showReadingView = (boolean) PlatformProvider.getPlatform().getLaunchIntentExtra("showReadingView", false);
if (showReadingView) {
switchView(READING_VIEW);
}
}
【问题讨论】:
-
您是否尝试过使用
Platform.runLater()?请注意,该事件来自 Android 层,在后台线程中。 -
是的,行得通。谢谢
-
我会添加它作为答案然后
标签: gluon gluon-mobile