SmartImageView的使用

来源:互联网 发布:数据口径是什么 编辑:程序博客网 时间:2024/06/06 14:11

SmartImageView的使用:将工具类拷贝到自己工程下

  • 1.在布局文件中定义控件

       <com.loopj.android.image.SmartImageView      android:id="@+id/img"      android:layout_width="200dp"      android:layout_height="200dp"      android:src="@drawable/ic_launcher"  />
  • 2.根据ID找到SmartImageView

    view=(SmartImageView) findViewById(R.id.img);    
  • 3.调用SmartImageView的api加载网络上的图片

      String uri="http://192.168.191.1/tomcat.png";  view.setImageUrl(uri);
0 0
原创粉丝点击