WebDialog
คลาสนี้ไม่มีให้ใช้งานใน SDK เวอร์ชั่นล่าสุดอีกต่อไป

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.

ขยาย:Dialog
แพ็คเกจ:widget
ผู้สร้าง
WebDialog(Context, String)

Constructor which can be used to display a dialog with an already-constructed URL.

public WebDialog(Context context, String url)
พารามิเตอร์คำอธิบาย
contextThe context to use to display the dialog
urlThe 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)
พารามิเตอร์คำอธิบาย
contextThe context to use to display the dialog
urlThe 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
themeIdentifier 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)
พารามิเตอร์คำอธิบาย
contextThe context to use to display the dialog
actionThe portion of the dialog URL following "dialog/"
parametersParameters which will be included as part of the URL
themeIdentifier of a theme to pass to the Dialog class
listenerThe 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)
พารามิเตอร์คำอธิบาย
listenerThe 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()
Returns
The listener, or null if none has been specified
dismiss()
public void dismiss()
onDetachedFromWindow()

Called when the window has been attached to the window manager. See View.onDetachedFromWindow().onDetachedFromWindow() for more information.

public void onDetachedFromWindow()
onAttachedToWindow()

Called when the window has been attached to the window manager. See View.onAttachedToWindow().onAttachedToWindow() for more information.

public void onAttachedToWindow()
setExpectedRedirectUrl(String)
protected void setExpectedRedirectUrl(String expectedRedirectUrl)
พารามิเตอร์คำอธิบาย
expectedRedirectUrl
parseResponseUri(String)
protected Bundle parseResponseUri(String urlString)
พารามิเตอร์คำอธิบาย
urlString
isListenerCalled()
protected boolean isListenerCalled()
getWebView()
protected WebView getWebView()
sendSuccessToListener(Bundle)
protected void sendSuccessToListener(Bundle values)
พารามิเตอร์คำอธิบาย
values
sendErrorToListener(Throwable)
protected void sendErrorToListener(Throwable error)
พารามิเตอร์คำอธิบาย
error
sendCancelToListener()
protected void sendCancelToListener()
ค่าคงตัว
DEFAULT_THEME
public static final int DEFAULT_THEME