第一步
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="190dp"
/>
第二步
<uses-permission android:name="android.permission.INTERNET"/>
第三步
repositories {
google()
jcenter()
mavenCentral()
}
第四步
implementation 'com.github.bumptech.glide:glide:4.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
同步一下
第五步
mIv4 = (ImageView) findViewById(R.id.imageView2);
//Glide.with(this).load("https://www.baidu.com/img/bd_logo1.png").into(mIv4)
Glide.with(this).load("https://www.baidu.com/img/bd_logo1.png").into(mIv4);
Android studio 005 加载网络图片
最新推荐文章于 2022-10-28 23:41:07 发布