public class

MessageCenterFragment

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

Class Overview

The Urban Airship Message Center. The message list will be displayed using the MessageListFragment, and messages will be displayed either in a split view using MessageFragment or by triggering startMessageActivity(String).

Summary

Nested Classes
class MessageCenterFragment.NoMessageSelectedFragment Fragment that displays instead of a message in split view when no message has been selected. 
Public Constructors
MessageCenterFragment()
Public Methods
static MessageCenterFragment newInstance(String messageId)
Creates a new MessageCenterFragment
void onCreate(Bundle savedInstanceState)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Subclasses can override to replace with their own layout.
void onDestroyView()
void onPause()
void onResume()
void onSaveInstanceState(Bundle savedInstanceState)
void onViewCreated(View view, Bundle savedInstanceState)
void setMessageID(String messageId)
Sets the message ID to display.
void setPredicate(RichPushInbox.Predicate predicate)
Sets the predicate to use for filtering messages.
Protected Methods
void configureMessageListFragment(MessageListFragment messageListFragment)
Called to configure the messageListFragment.
void showMessage(String messageId)
Displays a message.
[Expand]
Inherited Methods
From class android.support.v4.app.Fragment
From class java.lang.Object
From interface android.arch.lifecycle.LifecycleOwner
From interface android.content.ComponentCallbacks
From interface android.view.View.OnCreateContextMenuListener

Public Constructors

public MessageCenterFragment ()

Public Methods

public static MessageCenterFragment newInstance (String messageId)

Creates a new MessageCenterFragment

Parameters
messageId The message's ID to display.
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 must contain a place holder view with ID R.id.message_list_container.

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 onDestroyView ()

public void onPause ()

public void onResume ()

public void onSaveInstanceState (Bundle savedInstanceState)

public void onViewCreated (View view, Bundle savedInstanceState)

public void setMessageID (String messageId)

Sets the message ID to display.

Parameters
messageId The message ID.

public void setPredicate (RichPushInbox.Predicate predicate)

Sets the predicate to use for filtering messages. If unset, the default @link{MessageCenter} predicate will be used.

Parameters
predicate A predicate for filtering messages.

Protected Methods

protected void configureMessageListFragment (MessageListFragment messageListFragment)

Called to configure the messageListFragment.

Parameters
messageListFragment The message list fragment.

protected void showMessage (String messageId)

Displays a message.

Parameters
messageId The message ID.