implementation 'com.github.bumptech.glide:glide:4.8.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
<ImageView android:id="@+id/my_image_view" android:layout_width="wrap_content" android:layout_height="wrap_content" />
ImageView imageView = (ImageView) findViewById(R.id.my_image_view); Glide.with(this).load(R.drawable.timg).into(imageView);
添加网络权限html
<uses-permission android:name="android.permission.INTERNET" />
Glide.with(this).load(URL).into(imageView);
参考:java
https://www.jianshu.com/p/36092fe62637android
https://blog.csdn.net/Li_Qing_Xue/article/details/78919499git