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

Theme
Image Upload Info
XML Code
<com.telkom.legion.component.image.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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.LgnPhotoFieldandroid: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 Name | Xml Attrs | Related method(s) | Description |
---|---|---|---|
Set hint | android:hint | .hint | Set hint on Image Upload |
Set help button | app:showHelpButton | .showHelpButton | Show help button when label visible on Image Upload |
Set optional | app:isOptional | .isOptional | Set optional text on Image Upload |
Set required | app:isRequired | .isRequired | Set required text on Image Upload |
Set helper text | app:helperText | .helperText | Set helper text on Image upload |
Set photo limit | app:photoLimit | .limit | Set limit uploaded image on Image upload |
Set enable | android:enabled | .isEnabled | Set enable on Image upload |