public class ShareSheetStyle
extends java.lang.Object
| Constructor and Description |
|---|
ShareSheetStyle(android.content.Context context,
java.lang.String messageTitle,
java.lang.String messageBody) |
| Modifier and Type | Method and Description |
|---|---|
ShareSheetStyle |
addPreferredSharingOption(SharingHelper.SHARE_WITH preferredOption)
Adds application to the preferred list of applications which are shown on share dialog.
|
android.graphics.drawable.Drawable |
getCopyUrlIcon() |
java.lang.String |
getCopyURlText() |
java.lang.String |
getDefaultURL() |
java.lang.String |
getMessageBody() |
java.lang.String |
getMessageTitle() |
android.graphics.drawable.Drawable |
getMoreOptionIcon() |
java.lang.String |
getMoreOptionText() |
java.util.ArrayList<SharingHelper.SHARE_WITH> |
getPreferredOptions() |
int |
getStyleResourceID() |
java.lang.String |
getUrlCopiedMessage() |
ShareSheetStyle |
setCopyUrlStyle(android.graphics.drawable.Drawable icon,
java.lang.String label,
java.lang.String message)
Set the icon, label and success message for copy url option.
|
ShareSheetStyle |
setCopyUrlStyle(int drawableIconID,
int stringLabelID,
int stringMessageID)
Set the icon, label and success message for copy url option.
|
ShareSheetStyle |
setDefaultURL(java.lang.String url)
Set a default url to share in case there is any error creating the deep link
|
ShareSheetStyle |
setMoreOptionStyle(android.graphics.drawable.Drawable icon,
java.lang.String label)
Set the icon and label for the option to expand the application list to see more options.
|
ShareSheetStyle |
setMoreOptionStyle(int drawableIconID,
int stringLabelID)
Set the icon and label for the option to expand the application list to see more options.
|
ShareSheetStyle |
setStyleResourceID(int styleResourceID)
Set the given style to the List View showing the share sheet
|
public ShareSheetStyle(android.content.Context context,
java.lang.String messageTitle,
java.lang.String messageBody)
public ShareSheetStyle setDefaultURL(java.lang.String url)
Set a default url to share in case there is any error creating the deep link
url - A String with value of default url to be shared with the selected application in case deep link creation fails.public ShareSheetStyle setMoreOptionStyle(android.graphics.drawable.Drawable icon, java.lang.String label)
Set the icon and label for the option to expand the application list to see more options. Default label is set to "More"
icon - Drawable to set as the icon for more option. Default icon is system menu_more icon.label - A String with value for the more option label. Default label is "More"public ShareSheetStyle setMoreOptionStyle(int drawableIconID, int stringLabelID)
Set the icon and label for the option to expand the application list to see more options. Default label is set to "More"
drawableIconID - Resource ID for the drawable to set as the icon for more option. Default icon is system menu_more icon.stringLabelID - Resource ID for String label for the more option. Default label is "More"public ShareSheetStyle setCopyUrlStyle(android.graphics.drawable.Drawable icon, java.lang.String label, java.lang.String message)
Set the icon, label and success message for copy url option. Default label is "Copy link".
icon - Drawable to set as the icon for copy url option. Default icon is system menu_save iconlabel - A String with value for the copy url option label. Default label is "Copy link"message - A String with value for a toast message displayed on copying a url.
Default message is "Copied link to clipboard!"public ShareSheetStyle setCopyUrlStyle(int drawableIconID, int stringLabelID, int stringMessageID)
Set the icon, label and success message for copy url option. Default label is "Copy link".
drawableIconID - Resource ID for the drawable to set as the icon for copy url option. Default icon is system menu_save iconstringLabelID - Resource ID for the string label the copy url option. Default label is "Copy link"stringMessageID - Resource ID for the string message to show toast message displayed on copying a urlShareSheetStyle instance.public ShareSheetStyle addPreferredSharingOption(SharingHelper.SHARE_WITH preferredOption)
Adds application to the preferred list of applications which are shown on share dialog. Only these options will be visible when the application selector dialog launches. Other options can be accessed by clicking "More"
preferredOption - A list of applications to be added as preferred options on the app chooser.
Preferred applications are defined in SharingHelper.SHARE_WITH.public ShareSheetStyle setStyleResourceID(int styleResourceID)
Set the given style to the List View showing the share sheet
styleResourceID - A Styleable resource to be applied to the share sheet list viewpublic java.util.ArrayList<SharingHelper.SHARE_WITH> getPreferredOptions()
public android.graphics.drawable.Drawable getCopyUrlIcon()
public android.graphics.drawable.Drawable getMoreOptionIcon()
public java.lang.String getMessageBody()
public java.lang.String getMessageTitle()
public java.lang.String getCopyURlText()
public java.lang.String getDefaultURL()
public java.lang.String getMoreOptionText()
public java.lang.String getUrlCopiedMessage()
public int getStyleResourceID()