public class WebDialog
extends android.app.Dialog
Modifier and Type | Class and Description |
---|---|
static class |
WebDialog.Builder |
static interface |
WebDialog.OnCompleteListener
Interface that implements a listener to be called when the user's interaction with the
dialog completes, whether because the dialog finished successfully, or it was cancelled,
or an error was encountered.
|
android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_THEME |
Constructor and Description |
---|
WebDialog(android.content.Context context,
java.lang.String url)
Constructor which can be used to display a dialog with an already-constructed URL.
|
WebDialog(android.content.Context context,
java.lang.String action,
android.os.Bundle parameters,
int theme,
WebDialog.OnCompleteListener listener)
Constructor which will construct the URL of the Web dialog based on the specified parameters.
|
WebDialog(android.content.Context context,
java.lang.String url,
int theme)
Constructor which can be used to display a dialog with an already-constructed URL and a custom theme.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
void |
dismiss() |
WebDialog.OnCompleteListener |
getOnCompleteListener()
Gets the listener which will be notified when the dialog finishes.
|
protected android.webkit.WebView |
getWebView() |
protected boolean |
isListenerCalled() |
protected boolean |
isPageFinished() |
void |
onAttachedToWindow() |
protected void |
onCreate(android.os.Bundle savedInstanceState) |
void |
onDetachedFromWindow() |
boolean |
onKeyDown(int keyCode,
android.view.KeyEvent event) |
protected void |
onStart() |
protected android.os.Bundle |
parseResponseUri(java.lang.String urlString) |
void |
resize() |
protected void |
sendErrorToListener(java.lang.Throwable error) |
protected void |
sendSuccessToListener(android.os.Bundle values) |
protected void |
setExpectedRedirectUrl(java.lang.String expectedRedirectUrl) |
void |
setOnCompleteListener(WebDialog.OnCompleteListener listener)
Sets the listener which will be notified when the dialog finishes.
|
addContentView, closeOptionsMenu, create, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setTitle, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenu
public static final int DEFAULT_THEME
public WebDialog(android.content.Context context, java.lang.String url)
context
- the context to use to display the dialogurl
- the URL of the Web Dialog to display; no validation is done on this URL, but it should
be a valid URL pointing to a Facebook Web Dialogpublic WebDialog(android.content.Context context, java.lang.String url, int theme)
context
- the context to use to display the dialogurl
- the URL of the Web Dialog to display; no validation is done on this URL, but it should
be a valid URL pointing to a Facebook Web Dialogtheme
- identifier of a theme to pass to the Dialog classpublic WebDialog(android.content.Context context, java.lang.String action, android.os.Bundle parameters, int theme, WebDialog.OnCompleteListener listener)
context
- the context to use to display the dialogaction
- the portion of the dialog URL following "dialog/"parameters
- parameters which will be included as part of the URLtheme
- identifier of a theme to pass to the Dialog classlistener
- the listener to notify, or null if no notification is desiredpublic void setOnCompleteListener(WebDialog.OnCompleteListener listener)
listener
- the listener to notify, or null if no notification is desiredpublic WebDialog.OnCompleteListener getOnCompleteListener()
public boolean onKeyDown(int keyCode, android.view.KeyEvent event)
onKeyDown
in interface android.view.KeyEvent.Callback
onKeyDown
in class android.app.Dialog
public void dismiss()
dismiss
in interface android.content.DialogInterface
dismiss
in class android.app.Dialog
protected void onStart()
onStart
in class android.app.Dialog
public void onDetachedFromWindow()
onDetachedFromWindow
in interface android.view.Window.Callback
onDetachedFromWindow
in class android.app.Dialog
public void onAttachedToWindow()
onAttachedToWindow
in interface android.view.Window.Callback
onAttachedToWindow
in class android.app.Dialog
protected void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class android.app.Dialog
protected void setExpectedRedirectUrl(java.lang.String expectedRedirectUrl)
protected android.os.Bundle parseResponseUri(java.lang.String urlString)
protected boolean isListenerCalled()
protected boolean isPageFinished()
protected android.webkit.WebView getWebView()
public void resize()
protected void sendSuccessToListener(android.os.Bundle values)
protected void sendErrorToListener(java.lang.Throwable error)
public void cancel()
cancel
in interface android.content.DialogInterface
cancel
in class android.app.Dialog