public class

MessageListFragment

extends Fragment
java.lang.Object
   ↳ android.support.v4.app.Fragment
     ↳ com.urbanairship.messagecenter.MessageListFragment

Class Overview

Fragment that displays the Urban Airship Message Center.

Summary

Nested Classes
interface MessageListFragment.OnListViewReadyCallback Interface that defines the callback when the list view is ready. 
Public Constructors
MessageListFragment()
Public Methods
AbsListView getAbsListView()
Returns the AbsListView for the fragment.
void getAbsListViewAsync(MessageListFragment.OnListViewReadyCallback callback)
Gets the message list view once it is ready.
MessageViewAdapter getAdapter()
Returns the MessageViewAdapter for the list view.
RichPushMessage getMessage(int position)
Returns a the RichPushMessage at a given position.
void onCreate(Bundle savedInstanceState)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Subclasses can override to replace with their own layout.
void onDestroy()
void onDestroyView()
void onPause()
void onResume()
void onViewCreated(View view, Bundle savedInstanceState)
Protected Methods
MessageViewAdapter createMessageViewAdapter()
Called when the MessageViewAdapter needs to be created for the AbsListView.
[Expand]
Inherited Methods
From class android.support.v4.app.Fragment
From class java.lang.Object
From interface android.arch.lifecycle.LifecycleOwner
From interface android.arch.lifecycle.ViewModelStoreOwner
From interface android.content.ComponentCallbacks
From interface android.view.View.OnCreateContextMenuListener

Public Constructors

public MessageListFragment ()

Public Methods

public AbsListView getAbsListView ()

Returns the AbsListView for the fragment.

Returns

public void getAbsListViewAsync (MessageListFragment.OnListViewReadyCallback callback)

Gets the message list view once it is ready. The callback will be called on the main thread. If the list view is already ready, the callback will be called immediately.

Parameters
callback The on ready callback.

public MessageViewAdapter getAdapter ()

Returns the MessageViewAdapter for the list view.

Returns

public RichPushMessage getMessage (int position)

Returns a the RichPushMessage at a given position.

Parameters
position The list position.
Returns

public void onCreate (Bundle savedInstanceState)

public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

Subclasses can override to replace with their own layout. If doing so, the returned view hierarchy must have an AbsListView (GridView or ListView) whose id is android.R.id.list.

Parameters
inflater The LayoutInflater object that can be used to inflate any views in the fragment,
container If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view.
savedInstanceState If non-null, this fragment is being re-constructed from a previous saved state as given here.
Returns
  • Return the View for the fragment's UI, or null.

public void onDestroy ()

public void onDestroyView ()

public void onPause ()

public void onResume ()

public void onViewCreated (View view, Bundle savedInstanceState)

Protected Methods

protected MessageViewAdapter createMessageViewAdapter ()

Called when the MessageViewAdapter needs to be created for the AbsListView.

Returns