module LuckyHXML::Share

Overview

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>

Direct including types

Defined in:

lucky_hxml/share.cr

Instance Method Summary

Instance Method Detail

def 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.


[View source]
def 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.


[View source]
def share_namespace : Nil #

Defines Hyperview Share XML Namespace attribute


[View source]