zoukankan      html  css  js  c++  java
  • SmartImageView-网络图片查看器

    在gitHub.com里下载SmarImage

    xml文件:

    <com.loopJ.android.image.SmartImageView

            android:layout_weight="1000"

            android:id="@+id/siv"

            android:layout_width="fill_parent"

            android:layout_height="fill_parent"/>

    <EditText

        android:singleLine="true"

        android:id="@+id/et+path"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:hint="请输入图片路径"/>

    <Button

        android:onClick="click"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:text="浏览"/>   

    MainActivity文件:

    public void click(View view){

        SmartImageView siv = (SmartImageView) findViewById(R.id.siv);

        //第二个参数表示下载失败的时候显示的图片,第三个参数表示图片还在加载的时候显示

        siv.setImageUrl(et_path.getText().toString().trim(),

            R.drawable.ic_launcher, R.drawable.ic_launcher);

    }

  • 相关阅读:
    mysql实战45讲
    goland破解
    主从复制系列C
    主从复制系列B
    主从复制系列A
    sshd配置文件详解
    MySQL源码 数据结构array
    MySQL源码 information_schema新增表
    MySQL5.6 基于db的并行复制
    mysql 限制并发select patch
  • 原文地址:https://www.cnblogs.com/changyinlu/p/4909058.html
Copyright © 2011-2022 走看看