public class

BannerView

extends FrameLayout
implements View.OnClickListener BannerDismissLayout.Listener
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.urbanairship.iam.banner.BannerView

Class Overview

Banner view.

Summary

Nested Classes
interface BannerView.Listener Banner view listener. 
[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
BannerView(Context context, BannerDisplayContent displayContent, Assets assets)
Default constructor.
Public Methods
void onButtonClicked(View view, ButtonInfo buttonInfo)
void onClick(View view)
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 setAnimations(int in, int out)
Sets the animation.
void setListener(BannerView.Listener listener)
Sets the banner listener.
Protected Methods
void dismiss(boolean animate)
Used to dismiss the message.
BannerDisplayContent getDisplayContent()
Gets the in-app message.
Timer getTimer()
In-app message display timer.
void onAttachedToWindow()
View onCreateView(LayoutInflater inflater, ViewGroup container)
Called to inflate and attach the in-app message view.
void onPause()
Pauses the banner's timer.
void onResume()
Resumes the banner's timer.
void onWindowVisibilityChanged(int visibility)
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.View.OnClickListener
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.urbanairship.iam.banner.BannerDismissLayout.Listener

Public Constructors

public BannerView (Context context, BannerDisplayContent displayContent, Assets assets)

Default constructor.

Parameters
context The context.
displayContent The banner display content.
assets The in-app message assets.

Public Methods

public void onButtonClicked (View view, ButtonInfo buttonInfo)

public void onClick (View view)

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 setAnimations (int in, int out)

Sets the animation.

Parameters
in The animation in.
out The animation out.

public void setListener (BannerView.Listener listener)

Sets the banner listener.

Parameters
listener The banner listener.

Protected Methods

protected void dismiss (boolean animate)

Used to dismiss the message.

Parameters
animate true to animate the view out, otherwise false.

protected BannerDisplayContent getDisplayContent ()

Gets the in-app message.

Returns
  • The in-app message.

protected Timer getTimer ()

In-app message display timer.

Returns
  • The in-app message display timer.

protected void onAttachedToWindow ()

protected View onCreateView (LayoutInflater inflater, ViewGroup container)

Called to inflate and attach the in-app message view.

Parameters
inflater The inflater.
Returns
  • The view.

protected void onPause ()

Pauses the banner's timer.

protected void onResume ()

Resumes the banner's timer.

protected void onWindowVisibilityChanged (int visibility)