Components
Alert
Alert are to display a list of options on a temporary surface
Component Status Details
Status component contains a list of checks and completeness that has been tested and owned by each component
We don't use color as the only visual tool to convey information.
The component’s structure and properties include relevant options such as variant, style, size, orientation, optional iconography, decorations, selection, error state, etc. The title is the component name that uses the frame base component template. The base component name contains: .Base & "Component Name" if there is more than one. All component properties use the Legion foundation.
We can change all the parts that are connected to the component base. The inside of the base component remains connected to the master component. All variant options are not damaged when we change from one to another. Overriding changes to components will not reset other variants.
Component's already has component specs documentation.
The Alert component is utilized to present a temporary surface that provides a list of options. It displays a brief message or notification to the user within an existing activity.
Usage
To implement Alert, you can use this tag `LgnAlertButton` in the xml file.
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:actionText="Call to action"app:alertType="INFO"app:description="Interactively monetize corporate alignment"app:title="Info title"
Variant
In its use, alert has following variants :
Dismiss button without Action button
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:description="Interactively monetize corporate alignment"app:title="Info title"/>
Without Action button and Dismiss button
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:description="Interactively monetize corporate alignment"app:isDismissible="false"app:title="Info title"/>
Action button with Dismiss button
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:actionText="Call to action"app:description="Interactively monetize corporate alignment"app:title="Info title"/>
Action button without Dismiss button
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:actionText="Call to action"app:description="Interactively monetize corporate alignment"app:isDismissible="false"app:title="Info title"
Themes
There are 4 themes which are available :
Info
The following is properties value to implement Alert info
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:actionText="Call to action"app:alertType="INFO"app:description="Interactively monetize corporate alignment"app:title="Info title"
Success
The following is properties value to implement Alert Success
.
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:actionText="Call to action"app:alertType="SUCCESS"app:description="Interactively monetize corporate alignment"app:title="Info title"
Warning
The following is properties value to implement Alert Warning
.
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:actionText="Call to action"app:alertType="WARNING"app:description="Interactively monetize corporate alignment"app:title="Info title"
Error
The following is properties value to implement Alert Error
.
<com.telkom.legion.component.alert.LgnAlertandroid:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginHorizontal="@dimen/dimen_16dp"android:layout_marginTop="@dimen/dimen_20dp"app:actionText="Call to action"app:alertType="ERROR"app:description="Interactively monetize corporate alignment"app:title="Info title"
Attributes
Attribute Name | Xml Attrs | Related method(s) | Description |
---|---|---|---|
Alert Title | app:title | .title | Add title on alert |
Alert Description | app:description | .description | Add description on alert |
Alert Action Text | app:actionText | .actionText | Add action text on alert |
Alert Dissmis Button | app:isDismissible | .isDismissible | Add dismiss button visibility on alert |
Alert Type | app:alertType | .alertType | Configure alert type |
Alert Icon Visibility | app:showIcon | .showIcon | Configure visibiltiy alert icon |