java.lang.Object | ||
↳ | android.app.Fragment | |
↳ | com.urbanairship.push.iam.InAppMessageFragment |
A fragment that displays an in-app message.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | InAppMessageFragment.Listener | Listener for InAppMessageFragment events. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
long | DEFAULT_DURATION | Default duration in milliseconds. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
InAppMessageFragment() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
final void |
addListener(InAppMessageFragment.Listener listener)
Subscribe a listener for in-app message fragment events.
| ||||||||||
static Bundle |
createArgs(InAppMessage message, int dismissAnimation)
Creates arguments for the InAppMessageFragment.
| ||||||||||
void |
dismiss(boolean animate)
Dismisses the fragment.
| ||||||||||
int |
getDismissAnimation()
Gets the dismiss animation resource ID.
| ||||||||||
InAppMessage |
getMessage()
Gets the in-app message.
| ||||||||||
boolean |
isDismissed()
Checks if the fragment has been dismissed.
| ||||||||||
void | onCreate(Bundle savedInstance) | ||||||||||
View | onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | ||||||||||
void | onPause() | ||||||||||
void | onResume() | ||||||||||
void | onSaveInstanceState(Bundle outState) | ||||||||||
final void |
removeListener(InAppMessageFragment.Listener listener)
Unsubscribe a listener for in-app message fragment events.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Default duration in milliseconds. The value is only used if the in-app message's
getDuration()
returns null.
Subscribe a listener for in-app message fragment events.
listener | An object implementing the
InAppMessageFragment.Listener interface.
|
---|
Creates arguments for the InAppMessageFragment. Arguments must be set after creating the initial fragment.
message | The associated in-app message. |
---|---|
dismissAnimation | Resource ID of a fragment transition to run when the message is dismissed. |
Dismisses the fragment.
animate | true if the fragment should animate out, otherwise false .
|
---|
Gets the dismiss animation resource ID.
Checks if the fragment has been dismissed.
true
if the fragment is dismissed, otherwise false
.
Unsubscribe a listener for in-app message fragment events.
listener | An object implementing the
InAppMessageFragment.Listener interface.
|
---|