Example:
view style: "Button" do
share_behavior trigger: "press", url: "https://www.instawork.com", message: "Check out this website!"
text "Share link", style: "Button__Label"
end
Output:
<view style="Button">
<behavior
xmlns:share="https://instawork.com/hyperview-share"
action="share"
trigger="press"
share:url="https://www.instawork.com"
share:message="Check out this website!"
/>
<text style="Button__Label">Share link</text>
</view>
Instance methods
share_behavior(dialog_title :
String |
Nil = nil, subject :
String |
Nil = nil, message :
String |
Nil = nil, url :
String |
Nil = nil, title :
String |
Nil = nil, **opts, &) :
Nil Represents share behavior
dialog_title - The title that appears as part of the Share UI on Android devices.
subject - If the user chooses to share the content via email, this attribute pre-populate the subject of the email.
message - The message to share. Either message or url must be provided. If neither is provided, the behavior is a no-op.
url - The url to share. Either message or url must be provided. If neither is provided, the behavior is a no-op.
title - The title of the message to share. A title can be included with either message or url.
System-level sharing functionality can be triggered via behaviors.
Typically, the resource being shared is a URL, but the shared data can
also include a title, message, and subject.
Sourceshare_behavior(dialog_title :
String |
Nil = nil, subject :
String |
Nil = nil, message :
String |
Nil = nil, url :
String |
Nil = nil, title :
String |
Nil = nil, **opts) :
Nil Represents share behavior
dialog_title - The title that appears as part of the Share UI on Android devices.
subject - If the user chooses to share the content via email, this attribute pre-populate the subject of the email.
message - The message to share. Either message or url must be provided. If neither is provided, the behavior is a no-op.
url - The url to share. Either message or url must be provided. If neither is provided, the behavior is a no-op.
title - The title of the message to share. A title can be included with either message or url.
System-level sharing functionality can be triggered via behaviors.
Typically, the resource being shared is a URL, but the shared data can
also include a title, message, and subject.
Sourceshare_namespace
Defines Hyperview Share XML Namespace attribute
Source