public class

UAWebView

extends WebView
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.AbsoluteLayout
         ↳ android.webkit.WebView
           ↳ com.urbanairship.widget.UAWebView

Class Overview

A web view that sets settings appropriate for Urban Airship content.

Summary

[Expand]
Inherited Constants
From class android.webkit.WebView
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
UAWebView(Context context)
UAWebView Constructor
UAWebView(Context context, AttributeSet attrs)
UAWebView Constructor
UAWebView(Context context, AttributeSet attrs, int defStyle)
UAWebView Constructor
UAWebView(Context context, AttributeSet attrs, int defStyle, int defResStyle)
UAWebView Constructor
Public Methods
RichPushMessage getCurrentMessage()
The current loaded RichPushMessage.
void loadData(String data, String mimeType, String encoding)
void loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, String historyUrl)
void loadRichPushMessage(RichPushMessage message)
Loads the web view with the rich push message.
void loadUrl(String url)
Loads the given URL.
void loadUrl(String url, Map<StringString> additionalHttpHeaders)
Loads the given URL with the specified additional HTTP headers.
boolean onTouchEvent(MotionEvent event)
void setWebViewClient(WebViewClient webViewClient)
Protected Methods
void initializeView()
Initializes the web view with any default settings.
void populateCustomJavascriptInterfaces()
Populate any custom javascript interfaces by calling addJavascriptInterface(Object interface, String identifier) for each custom interface.
[Expand]
Inherited Methods
From class android.webkit.WebView
From class android.widget.AbsoluteLayout
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.ViewGroup.OnHierarchyChangeListener
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.ViewTreeObserver.OnGlobalFocusChangeListener
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public UAWebView (Context context)

UAWebView Constructor

Parameters
context A Context object used to access application assets.

public UAWebView (Context context, AttributeSet attrs)

UAWebView Constructor

Parameters
context A Context object used to access application assets.
attrs An AttributeSet passed to our parent.

public UAWebView (Context context, AttributeSet attrs, int defStyle)

UAWebView Constructor

Parameters
context A Context object used to access application assets.
attrs An AttributeSet passed to our parent.
defStyle The default style resource ID.

public UAWebView (Context context, AttributeSet attrs, int defStyle, int defResStyle)

UAWebView Constructor

Parameters
context A Context object used to access application assets.
attrs An AttributeSet passed to our parent.
defStyle The default style resource ID.
defResStyle A resource identifier of a style resource that supplies default values for the view, used only if defStyle is 0 or cannot be found in the theme. Can be 0 to not look for defaults.

Public Methods

public RichPushMessage getCurrentMessage ()

The current loaded RichPushMessage.

Returns
  • The current RichPushMessage that was loaded.

public void loadData (String data, String mimeType, String encoding)

public void loadDataWithBaseURL (String baseUrl, String data, String mimeType, String encoding, String historyUrl)

public void loadRichPushMessage (RichPushMessage message)

Loads the web view with the rich push message.

Parameters
message The RichPushMessage that will be displayed.

public void loadUrl (String url)

Loads the given URL.

Parameters
url The URL of the resource to load.

public void loadUrl (String url, Map<StringString> additionalHttpHeaders)

Loads the given URL with the specified additional HTTP headers.

Parameters
url The URL to load.
additionalHttpHeaders The additional headers to be used in the HTTP request for this URL.

public boolean onTouchEvent (MotionEvent event)

public void setWebViewClient (WebViewClient webViewClient)

Protected Methods

protected void initializeView ()

Initializes the web view with any default settings.

Called during create.

protected void populateCustomJavascriptInterfaces ()

Populate any custom javascript interfaces by calling addJavascriptInterface(Object interface, String identifier) for each custom interface.

Called after initializeView.