Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback

Components

Image Upload

The Image Upload component is used to display and upload images.

banner-Image Upload

The Image Upload component is used to display and upload images.

Legion Image Upload Android

Theme

Image Upload Info

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
app:photoLimit="3" />

Kotlin Code

...
binding.photoFieldInfo.info = "Info"
...

Image Upload Success

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldSuccess"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
app:photoLimit="3" />

Kotlin Code

...
binding.photoFieldInfo.info = "Success"
...

Image Upload Error

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldError"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
app:photoLimit="3" />

Kotlin Code

...
binding.photoFieldInfo.info = "Error"
...

Image Upload Helper

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldHelper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
app:helperText="Helper"
app:photoLimit="3" />

Variant

Image Upload with Hint and Helper

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldLabelHelper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
android:hint="Label"
app:helperText="Message"
app:photoLimit="3" />

Image Upload only with hint

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
android:hint="Label"
app:photoLimit="3" />

Image Upload only with Helper

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldHelper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
app:helperText="Message"
app:photoLimit="3" />

Image Upload without Hint and Helper

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldOnly"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
app:photoLimit="3" />

State

Enable Image Upload

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldEnabled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
android:enabled="true"
app:photoLimit="3" />

Disable Image Upload

XML Code

<com.telkom.legion.component.image.LgnPhotoField
android:id="@+id/photoFieldDisabled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dimen_16dp"
android:enabled="false"
app:photoLimit="3" />

Attribute

Attribute NameXml AttrsRelated method(s)Description
Set hintandroid:hint.hintSet hint on Image Upload
Set help buttonapp:showHelpButton.showHelpButtonShow help button when label visible on Image Upload
Set optionalapp:isOptional.isOptionalSet optional text on Image Upload
Set requiredapp:isRequired.isRequiredSet required text on Image Upload
Set helper textapp:helperText.helperTextSet helper text on Image upload
Set photo limitapp:photoLimit.limitSet limit uploaded image on Image upload
Set enableandroid:enabled.isEnabledSet enable on Image upload