-
Notifications
You must be signed in to change notification settings - Fork 12
LinkWedge
Link tags can exist as children of the App, Contributor, and License wedges. They can also be added as children of the root tag, though that is not their intended use. A few links are generated automatically by these wedges, such as links to the github profile of contributors for which the login
attribute has been specified, and so on. These auto-generated links are specified in the wedges' individual documentation pages.
If you wish to remove an auto-generated link, you can simply define a LinkWedge
with the same id
and the hidden
attribute. However, if you want to modify another value of an auto-generated link, such as the title or icon, you may need to specify that you want to override consecutive merges as well so that it is not overwritten if the wedge receives more information from the GitHub API. See "Overriding Resources and Providing Translations" for more information on overriding merges.
By default, AppWedge
links are displayed below the app description, ContributorWedge
links are displayed in a dialog (that only appears if the contributor has a bio
), and LicenseWedge
links are displayed below the description.
<me.jfenn.attribouter.wedges.LinkWedge
name="Documentation"
url="https://jfenn.me/Attribouter/"
icon="@drawable/ic_book"
priority="7" />
Attribute | Type | Description |
---|---|---|
id | String | The id of the link, to prevent duplicate links from being created. |
name | String / String Resource | The name/title of the link. |
url | String | The url of the link. |
icon | String (URL) / Drawable Resource | The icon to display next to the link. |
priority | Integer | Defines how the links should be sorted - the highest priority appears first in the list, and/or is opened when the whole item is clicked. |
hidden | Boolean | Whether to hide the link. This is useful for removing automatically generated links that you do not want to display (example: removing the 'playStore' link generated by <appInfo> using the package name if your app is not published on the play store). |
The LinkWedge
also has various "sub-wedges" that extend its functionality for various situations, such as sending an email, displaying license information, or opening the app's play store page without defining its package name.
The EmailLinkWedge
accepts only two attributes: priority
(inherited from LinkWedge
) and email
.
<me.jfenn.attribouter.wedges.EmailLinkWedge
email="dev@jfenn.me"
priority="6" />
Unfinished.
The PlayStoreLinkWedge
accepts one attribute (priority
) and determines the package name at runtime to open its play store page.
<me.jfenn.attribouter.wedges.PlayStoreLinkWedge
priority="5" />
This documentation can also be found at https://jfenn.me/.