List of usage examples for android.support.v4.app ListFragment getListAdapter
public ListAdapter getListAdapter()
From source file:org.kaaproject.kaa.demo.notification.activity.MainActivity.java
private void initNotificationListener() { notificationListener = new NotificationListener() { public void onNotification(final long topicId, final Notification notification) { Log.i(NotificationConstants.TAG, "Notification received: " + notification.toString()); TopicHelper.addNotification(TopicStorage.get().getTopicMap(), topicId, notification); TopicStorage.get().save(MainActivity.this); ListFragment fragment = (ListFragment) getSupportFragmentManager() .findFragmentByTag(NotificationConstants.NOTIFICATION_FRAGMENT_TAG); if (fragment != null && fragment.isVisible()) { updateAdapter((ArrayAdapter) fragment.getListAdapter()); return; }/*www .java2 s .c o m*/ fragment = (ListFragment) getSupportFragmentManager() .findFragmentByTag(NotificationConstants.TOPIC_FRAGMENT_TAG); if (fragment != null && fragment.isVisible()) { showNotificationDialog(topicId, notification); updateAdapter((ArrayAdapter) fragment.getListAdapter()); } } }; }