标签:with activity load cti instance mpi static 控件 state
1、依赖里面加入
compile ‘com.github.bumptech.glide:glide:3.6.1‘
2、布局里面放置一个ImageView控件
<ImageView
android:id="@+id/img"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
3、代码里面
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_img_test);
ImageView img = (ImageView) findViewById(R.id.img);//layout中放一个ImageView控件,id是@+id/img
String url = "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3917297328,2353437284&fm=27&gp=0.jpg";
Glide.with(this).load(url).placeholder(R.drawable.myimg).crossFade().into(img);
}
标签:with activity load cti instance mpi static 控件 state
原文地址:http://www.cnblogs.com/luguo2017/p/7520882.html