0

How to display an image using a URL of a known jpg, png ..etc. File ? I want an image , and I want it to be loaded from the internet from a particular website.

With that done, I would like to make that image of an appropriate size... Say I put the width as the same as screen_width (size)....What about the height ? I don't want to spoil the ratio of height/width of the original image...So is the height automatically set to account for the ratio ? or do I have to put in some value myself ...?

Plus, I want it to be zoomable.

Timmetje
  • 7,641
  • 18
  • 36
  • Can you share any information on what you tried? A good place to start is [android developer website](http://developer.android.com/training/index.html). Download files with [AsyncTask](http://developer.android.com/reference/android/os/AsyncTask.html) and read about [displaying bitmaps](http://developer.android.com/training/displaying-bitmaps/index.html) – Timmetje Jul 02 '13 at 06:46
  • 1
    refer this [answer](http://stackoverflow.com/questions/15850772/how-to-convert-a-google-charts-graph-to-image-in-android/15850907#15850907). – Gunaseelan Jul 02 '13 at 06:50
  • trouble is , I dont know where to start... –  Jul 02 '13 at 07:18

2 Answers2

0

To load images from website, you need to get the path from website server where the photo is stored. For image displaying put height as wrap_content mode so that the space will occupy as much as needed to display.

user2064667
  • 124
  • 1
  • 12
0

For this purpose you can use a Lazy Adapter. Here you can find a good example of it: https://stackoverflow.com/a/3068012/2436683. Maybe you can use it as a starting point.

Community
  • 1
  • 1
Julian Mancera
  • 194
  • 1
  • 12