ShareDialog
เวอร์ชั่นที่ใหม่กว่าของคลาสนี้พร้อมแล้ว ตรวจสอบได้ เวอร์ชั่นล่าสุด

Provides functionality to share content via the Facebook Share Dialog

ขยาย:FacebookDialogBase
การนำไปใช้:Sharer
แพ็คเกจ:widget
ผู้สร้าง
ShareDialog(Activity)

Constructs a new ShareDialog.

public ShareDialog(Activity activity)
พารามิเตอร์คำอธิบาย
activityActivity to use to share the provided content.
ShareDialog(Fragment)

Constructs a new ShareDialog.

public ShareDialog(Fragment fragment)
พารามิเตอร์คำอธิบาย
fragmentFragment to use to share the provided content.
วิธีการคลาส
show(Activity, ShareContent)

Helper to show the provided ShareContent using the provided Activity. No callback will be invoked.

public static void show(Activity activity, ShareContent shareContent)
พารามิเตอร์คำอธิบาย
activityActivity to use to share the provided content
shareContentContent to share
show(Fragment, ShareContent)

Helper to show the provided ShareContent using the provided Fragment. No callback will be invoked.

public static void show(Fragment fragment, ShareContent shareContent)
พารามิเตอร์คำอธิบาย
fragmentFragment to use to share the provided content
shareContentContent to share
canShow(Class)

Indicates whether it is possible to show the dialog for ShareContent of the specified type.

public static boolean canShow(Class contentType)
พารามิเตอร์คำอธิบาย
contentTypeClass of the intended ShareContent to share.
Returns
True if the specified content type can be shown via the dialog
วิธีการแบบอินสแตนซ์
getShouldFailOnDataError()

Specifies whether the sharer should fail if it finds an error with the share content. If false, the share dialog will still be displayed without the data that was mis-configured. For example, an invalid placeID specified on the shareContent would produce a data error.

public boolean getShouldFailOnDataError()
Returns
A Boolean value.
getShouldFailOnDataError()
public boolean getShouldFailOnDataError()
setShouldFailOnDataError(boolean)

Specifies whether the sharer should fail if it finds an error with the share content. If false, the share dialog will still be displayed without the data that was mis-configured. For example, an invalid placeID specified on the shareContent would produce a data error.

public void setShouldFailOnDataError(boolean shouldFailOnDataError)
พารามิเตอร์คำอธิบาย
shouldFailOnDataErrorWhether the dialog should fail if it finds an error.
setShouldFailOnDataError(boolean)
public void setShouldFailOnDataError(boolean shouldFailOnDataError)
พารามิเตอร์คำอธิบาย
shouldFailOnDataError
canShow(ShareContent, Mode)

Call this to check if the Share Dialog can be shown in a specific mode.

public boolean canShow(ShareContent content, Mode mode)
พารามิเตอร์คำอธิบาย
content
modeMode of the Share Dialog
Returns
True if the dialog can be shown in the passed in Mode
show(ShareContent, Mode)

Call this to show the Share Dialog in a specific mode

public void show(ShareContent content, Mode mode)
พารามิเตอร์คำอธิบาย
content
modeMode of the Share Dialog