android - Get image width and height before loading them -


i'm using universal image loader library download images internet.

is possible images size before loading them set layout prams desired values?

something injustdecodebounds property, ideas?

quoting documentation @ https://github.com/nostra13/android-universal-image-loader

how uil define bitmap size needed exact imageview? searches defined parameters?

  1. get actual measured width , height of imageview.

  2. get android:layout_width , android:layout_height parameters.

  3. get android:maxwidth and/or android:maxheight parameters.

  4. get maximum width and/or height parameters configuration (memorycacheextraoptions(int, int) option).

  5. get width and/or height of device screen.

so try set android:layout_width|android:layout_height or android:maxwidth|android:maxheight parameters imageview if know approximate maximum size of it. correctly compute bitmap size needed view , save memory.

you cannot image height , width before image downloaded. can set imageview height , width.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -