我设置了一个警报以显示相应的Notification. 的PendingIntent用于Notification启动 Gluon App 主类。为了显示ViewhomeView 以外的其他内容,我调用switchView(otherView)了该postInit方法。显示了 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);
}
}