Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 947 Bytes

component_image_detail.md

File metadata and controls

36 lines (28 loc) · 947 Bytes

Image detail widget

Image detail widget is a component that displays an image fetched from a given url.

How to use

To make the component work correctly, you need to perform the following steps.

Add ImageDetailView widget into your xml layout

<com.strv.chat.core.core.ui.chat.imageDetail.ImageDetailView
    android:id="@+id/iv_photo"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

Initialize the component

Call type-safe init() builder function in onCreate() method that allows creating Kotlin-based domain-specific language (DSL) suitable for configuring the component.

Optional properties:

  • url: String
    • Url of the displayed image that a user wants to display.
  • imageLoader: ImageLoader
    • Defines how to upload a picture's url to ImageViews.
imageDetail.init {
    imageUrl = imageDetailViewModel.imageUrl
    imageLoader = loader
}