@Override public void showNotification(final NotificationChannel channel) { if (channel.getItems().isEmpty() && channel.getDefaultNotification() == null) { return; } if (!myAnimationView.isReady()) { if (myFirstChannel == null) { myFirstChannel = channel; } return; } if (myAnimationView.isVisible()) { return; } NotificationComponent nc = new NotificationComponent(channel, myAnimationView); channel.setVisible(true); nc.processItems(); myAnimationView.setComponent( nc.getComponent(), channel.getButton(), new Runnable() { @Override public void run() { channel.getButton().setBackground(channel.getNormalColor()); channel.setVisible(false); } }); }
@Override public void hideNotification() { myAnimationView.close(); }