This class provides a mechanism for displaying Facebook Web dialogs inside a Dialog. Helper methods are provided to construct commonly-used dialogs, or a caller can specify arbitrary parameters to call other dialogs.
Estende: | Dialog |
Pacote: | widget |
WebDialog(Context, String)
Constructor which can be used to display a dialog with an already-constructed URL.
public WebDialog(Context context, String url)
Parâmetro | Descrição |
---|---|
context | The context to use to display the dialog |
url | 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 Dialog |
WebDialog(Context, String, int)
Constructor which can be used to display a dialog with an already-constructed URL and a custom theme.
public WebDialog(Context context, String url, int theme)
Parâmetro | Descrição |
---|---|
context | The context to use to display the dialog |
url | 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 Dialog |
theme | Identifier of a theme to pass to the Dialog class |
WebDialog(Context, String, Bundle, int, OnCompleteListener)
Constructor which will construct the URL of the Web dialog based on the specified parameters.
public WebDialog(Context context, String action, Bundle parameters, int theme, OnCompleteListener listener)
Parâmetro | Descrição |
---|---|
context | The context to use to display the dialog |
action | The portion of the dialog URL following "dialog/" |
parameters | Parameters which will be included as part of the URL |
theme | Identifier of a theme to pass to the Dialog class |
listener | The listener to notify, or null if no notification is desired |
setOnCompleteListener(OnCompleteListener)
Sets the listener which will be notified when the dialog finishes.
public void setOnCompleteListener(OnCompleteListener listener)
Parâmetro | Descrição |
---|---|
listener | The listener to notify, or null if no notification is desired |
getOnCompleteListener()
Gets the listener which will be notified when the dialog finishes.
public OnCompleteListener getOnCompleteListener()
dismiss()
public void dismiss()
onDetachedFromWindow()
public void onDetachedFromWindow()
onAttachedToWindow()
public void onAttachedToWindow()
onCreate(Bundle)
protected void onCreate(Bundle savedInstanceState)
Parâmetro | Descrição |
---|---|
savedInstanceState |
DEFAULT_THEME
public static final int DEFAULT_THEME