public class WebDialog extends Dialog
Modifier and Type | Class and Description |
---|---|
static class |
WebDialog.Builder
Provides a builder that allows construction of an arbitary Facebook web dialog.
|
static class |
WebDialog.FeedDialogBuilder
Provides a builder that allows construction of the parameters for showing
the Feed Dialog.
|
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.
|
static class |
WebDialog.RequestsDialogBuilder
Provides a builder that allows construction of the parameters for showing
the Requests Dialog.
|
DialogInterface.OnCancelListener, DialogInterface.OnClickListener, DialogInterface.OnDismissListener, DialogInterface.OnKeyListener, DialogInterface.OnMultiChoiceClickListener, DialogInterface.OnShowListener
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_THEME |
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, BUTTON1, BUTTON2, BUTTON3
Constructor and Description |
---|
WebDialog(Context context,
String url)
Constructor which can be used to display a dialog with an already-constructed URL.
|
WebDialog(Context context,
String action,
Bundle parameters,
int theme,
WebDialog.OnCompleteListener listener)
Constructor which will construct the URL of the Web dialog based on the specified parameters.
|
WebDialog(Context context,
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 |
dismiss() |
WebDialog.OnCompleteListener |
getOnCompleteListener()
Gets the listener which will be notified when the dialog finishes.
|
void |
onAttachedToWindow() |
protected void |
onCreate(Bundle savedInstanceState) |
void |
onDetachedFromWindow() |
void |
setOnCompleteListener(WebDialog.OnCompleteListener listener)
Sets the listener which will be notified when the dialog finishes.
|
addContentView, cancel, closeOptionsMenu, 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, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onStart, 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(Context context, 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(Context context, 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(Context context, String action, 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 void dismiss()
dismiss
in interface DialogInterface
dismiss
in class Dialog
public void onDetachedFromWindow()
onDetachedFromWindow
in interface Window.Callback
onDetachedFromWindow
in class Dialog
public void onAttachedToWindow()
onAttachedToWindow
in interface Window.Callback
onAttachedToWindow
in class Dialog