java.lang.Object | ||
↳ | androidx.fragment.app.Fragment | |
↳ | com.urbanairship.messagecenter.MessageCenterFragment |
The 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 starting
an activity with the action VIEW_MESSAGE_INTENT_ACTION
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
class | MessageCenterFragment.NoMessageSelectedFragment | Fragment that displays instead of a message in split view when no message has been selected. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
androidx.fragment.app.Fragment
|
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(Predicate<Message> 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.
| ||||||||||
void |
showMessageExternally(Context context, String messageId)
Called to display a message in single pane mode.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
androidx.fragment.app.Fragment
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.content.ComponentCallbacks
| |||||||||||
From interface
android.view.View.OnCreateContextMenuListener
| |||||||||||
From interface
androidx.activity.result.ActivityResultCaller
| |||||||||||
From interface
androidx.lifecycle.HasDefaultViewModelProviderFactory
| |||||||||||
From interface
androidx.lifecycle.LifecycleOwner
| |||||||||||
From interface
androidx.lifecycle.ViewModelStoreOwner
| |||||||||||
From interface
androidx.savedstate.SavedStateRegistryOwner
|
Creates a new MessageCenterFragment
messageId | The message's ID to display. |
---|
MessageCenterFragment
instance.
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
.
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. |
Sets the message ID to display.
messageId | The message ID. |
---|
Sets the predicate to use for filtering messages. If unset, the default @link{MessageCenter} predicate will be used.
predicate | A predicate for filtering messages. |
---|
Called to configure the messageListFragment.
messageListFragment | The message list fragment. |
---|
Displays a message.
messageId | The message ID. |
---|
Called to display a message in single pane mode.
context | The context. |
---|---|
messageId | The message Id. |