public class

BannerFragment

extends Fragment
implements View.OnClickListener BannerDismissLayout.Listener
java.lang.Object
   ↳ android.app.Fragment
     ↳ com.urbanairship.iam.banner.BannerFragment

Class Overview

A fragment that displays an in-app message banner.

Summary

Nested Classes
class BannerFragment.Builder BannerFragment builder. 
[Expand]
Inherited Constants
From interface android.content.ComponentCallbacks2
Public Constructors
BannerFragment()
Public Methods
void dismiss(boolean animate, ResolutionInfo resolutionInfo)
Dismisses the fragment.
BannerDisplayContent getDisplayContent()
Gets the in-app message.
boolean isDismissed()
Checks if the fragment has been dismissed.
static BannerFragment.Builder newBuilder()
Creates a new fragment builder.
void onButtonClicked(View view, ButtonInfo buttonInfo)
void onClick(View view)
void onCreate(Bundle savedInstance)
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void onDismissed(View view)
Called when a child view was dismissed from a swipe.
void onDragStateChanged(View view, int state)
Called when a child view's drag state changes.
void onPause()
void onResume()
void onSaveInstanceState(Bundle outState)
void onStart()
void onStop()
Protected Methods
Timer getTimer()
In-app message display timer.
[Expand]
Inherited Methods
From class android.app.Fragment
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface android.view.View.OnClickListener
From interface android.view.View.OnCreateContextMenuListener
From interface com.urbanairship.iam.banner.BannerDismissLayout.Listener

Public Constructors

public BannerFragment ()

Public Methods

public void dismiss (boolean animate, ResolutionInfo resolutionInfo)

Dismisses the fragment.

Parameters
animate true if the fragment should animate out, otherwise false.
resolutionInfo The resolution info.

public BannerDisplayContent getDisplayContent ()

Gets the in-app message.

Returns
  • The in-app message.

public boolean isDismissed ()

Checks if the fragment has been dismissed.

Returns
  • true if the fragment is dismissed, otherwise false.

public static BannerFragment.Builder newBuilder ()

Creates a new fragment builder.

Returns
  • A banner fragment builder.

public void onButtonClicked (View view, ButtonInfo buttonInfo)

public void onClick (View view)

public void onCreate (Bundle savedInstance)

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

public void onDismissed (View view)

Called when a child view was dismissed from a swipe. It is up to the listener to remove or hide the view from the parent.

public void onDragStateChanged (View view, int state)

Called when a child view's drag state changes.

Parameters
state The drag state will be either ViewDragHelper.STATE_IDLE, ViewDragHelper.STATE_DRAGGING, or ViewDragHelper.STATE_SETTLING.

public void onPause ()

public void onResume ()

public void onSaveInstanceState (Bundle outState)

public void onStart ()

public void onStop ()

Protected Methods

protected Timer getTimer ()

In-app message display timer.

Returns
  • The in-app message display timer.