2014-02-18 85 views
1

我使用从https://github.com/pingpongboss/StandOut最突出的API,当我使用下面的选项组合在我的窗口:如何关闭突出显示通知?

FLAG_DECORATION_SYSTEM | FLAG_WINDOW_HIDE_ENABLE 

,我有getPersistentNotificationIntent和getHiddenNotificationIntent实现这样的方法:

@Override 
public Intent getPersistentNotificationIntent(int id) { 
    return StandOutWindow.getCloseAllIntent(this, MyFloatingWindow.class); 
} 

@Override 
public Intent getHiddenNotificationIntent(int id) { 
    return StandOutWindow.getShowIntent(this, MyFloatingWindow.class, id); 
} 

而且几乎一切正常。如果我使用装饰关闭按钮关闭窗口,则通知关闭。如果按通知“点击关闭所有窗口”,通知和窗口关闭。如果我隐藏窗口并按隐藏通知,窗口恢复,我可以使用第一种方法关闭。但是,如果我按下隐藏按钮,然后按第一个通知“单击以关闭所有窗口”,窗口和“隐藏”通知关闭,但我以自己关闭的通知结束。

我该如何解决这个问题?

回答

相关问题