Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 669 Bytes

README.md

File metadata and controls

34 lines (26 loc) · 669 Bytes

NetworkImage-Compose

A Jetpack Compose library that provides Compose support for Glide.

Usage

  1. Add the dependency
 dependencies {
    implementation 'io.github.cjchen98:NetworkImage-Compose:0.1.1'
 }
  1. Provide a Glide RequestManager instance to your root Compose tree:
 setContent { 
     ProvideGlideLoader {
    	Home()
 	}
 }
NetworkImage(
    url: String,/*image url */
    modifier: Modifier = Modifier,
    contentDescription: String? = null,
    onLoading: {/* the widget to be displayed while the image is being downloaded*/ },
    onFailure: {/* the widget to be displayed if an error occurs*/},
)