Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback

Components

Image

The Image component is used to display images.

banner-Image
Component Status Details

Status component contains a list of checks and completeness that has been tested and owned by each component

check-list-icon We don't use color as the only visual tool to convey information.
check-list-icon The component’s structure and properties include relevant options such as variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.check-list-icon The title is the component name that uses the frame base component template.check-list-icon The base component name contains: .Base & "Component Name" if there is more than one.check-list-icon All component properties use the Legion foundation.
check-list-icon We can change all the parts that are connected to the component base.check-list-icon The inside of the base component remains connected to the master component.check-list-icon All variant options are not damaged when we change from one to another.check-list-icon Overriding changes to components will not reset other variants.
check-list-icon Component's already has component specs documentation.

Status

Resources

Upcoming

The Image component is used to display images. with capability can load from anything, like url, colors, bitmap, drawable or etc.

Usage

image - android

Basic

Image using Drawable

<com.telkom.legion.component.image.LgnImageView
android:layout_width="@dimen/dimen_64dp"
android:layout_height="@dimen/dimen_64dp"
android:layout_marginTop="@dimen/dimen_16dp"
android:layout_marginStart="@dimen/dimen_16dp"
android:src="@drawable/img_ktp"/>

Image using Color

<com.telkom.legion.component.image.LgnImageView
android:layout_width="@dimen/dimen_64dp"
android:layout_height="@dimen/dimen_64dp"
android:src="?attr/colorPrimary"
android:layout_marginTop="@dimen/dimen_16dp"
android:layout_marginStart="@dimen/dimen_16dp"/>

Image using Url

<com.telkom.legion.component.image.LgnImageView
android:layout_width="@dimen/dimen_64dp"
android:layout_height="@dimen/dimen_64dp"
android:layout_marginTop="@dimen/dimen_16dp"
android:layout_marginStart="@dimen/dimen_16dp"
app:src="https://oratakashi.com/images/weeding/female.jpg" />

Radius

Image radius 0dp

<com.telkom.legion.component.image.LgnImageView
android:layout_width="@dimen/dimen_64dp"
android:layout_height="@dimen/dimen_64dp"
android:layout_marginStart="@dimen/dimen_16dp"
android:layout_marginTop="@dimen/dimen_16dp"
app:src="https://oratakashi.com/images/weeding/female.jpg" />

Image radius 8dp

<com.telkom.legion.component.image.LgnImageView
android:layout_width="@dimen/dimen_64dp"
android:layout_height="@dimen/dimen_64dp"
android:layout_marginStart="@dimen/dimen_16dp"
android:layout_marginTop="@dimen/dimen_16dp"
android:radius="8dp"
app:src="https://oratakashi.com/images/weeding/female.jpg" />

Image radius 360dp

<com.telkom.legion.component.image.LgnImageView
android:layout_width="@dimen/dimen_64dp"
android:layout_height="@dimen/dimen_64dp"
android:layout_marginStart="@dimen/dimen_16dp"
android:layout_marginTop="@dimen/dimen_16dp"
android:radius="360dp"
app:src="https://oratakashi.com/images/weeding/female.jpg" />

Attributes

Attribute NameXml AttrsRelated method(s)Description
Load Drawable Imageapp:src or android:srcresDrawable or resIdTo load drawable image from xml
Load Colorsapp:src or android:srccolorsTo load colors in image from xml
Load Image Urlapp:srcurlTo load Url in image from xml
Set Corner Radiusandroid:radiusradiusTo set image radius in image from xml
Set Cacheapp:cachecacheTo set cache in image from xml