java.lang.Object | ||
↳ | androidx.fragment.app.Fragment | |
↳ | com.urbanairship.messagecenter.MessageFragment |
Fragment that displays a Message
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ERROR_DISPLAYING_MESSAGE | Error displaying the message. | |||||||||
int | ERROR_FETCHING_MESSAGES | Unable to fetch messages. | |||||||||
int | ERROR_MESSAGE_UNAVAILABLE | Message has been deleted or expired. | |||||||||
String | MESSAGE_ID | Argument key to specify the message Reporting |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
androidx.fragment.app.Fragment
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MessageFragment() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getMessageId()
Returns the fragment's
Message ID. | ||||||||||
static MessageFragment |
newInstance(String messageId)
Creates a new MessageFragment
| ||||||||||
View |
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Subclasses can override to replace with their own layout.
| ||||||||||
void | onDestroyView() | ||||||||||
void | onPause() | ||||||||||
void | onResume() | ||||||||||
void | onStart() | ||||||||||
void | onStop() | ||||||||||
void | onViewCreated(View view, Bundle savedInstanceState) |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
retry()
Retries loading the message.
| ||||||||||
void |
showErrorPage(int error)
Shows the error page.
| ||||||||||
void |
showMessage()
Shows the message.
| ||||||||||
void |
showProgress()
Shows the progress bar
|
[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
|
Error displaying the message.
Unable to fetch messages.
Message has been deleted or expired.
Argument key to specify the message Reporting
Creates a new MessageFragment
messageId | The message's ID to display |
---|
Subclasses can override to replace with their own layout. If doing so, the
returned view hierarchy must have a MessageWebView whose id
is android.R.id.message
, a progress view whose id is android.R.id.progress
,
and can optionally error page with a view id R.id.error
.
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. |
Retries loading the message.
Shows the error page.
error | The error. |
---|
Shows the message.
Shows the progress bar