示例#1
0
文件: Home.java 项目: JayyyR/TabNav
    @Override
    protected void onPostExecute(String result) {
      super.onPostExecute(result);

      progressDialog.dismiss();

      // download images
      ImageDownloader getImages = new ImageDownloader(activity);
      getImages.execute();
    }
  public void downloadImage(View view) {
    // http://www.howbigismypotato.com/images/potato.jpg

    ImageDownloader task = new ImageDownloader();
    Bitmap myImage;

    try {
      myImage = task.execute("http://www.howbigismypotato.com/images/potato.jpg").get();

      downloadedImage.setImageBitmap(myImage);

    } catch (Exception e) {
      e.printStackTrace();
    }
    Log.i("interact", "button tapped");
  }