Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vidmind - Nice upgrades #52

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Vidmind - Nice upgrades #52

wants to merge 7 commits into from

Conversation

amirlazarovich
Copy link

Better cache handling, flexible ImageLoader, inheritance friendlier classes, minor bugfixes.

Notes:

  • We "disabled" the http retry mechanism (by simply setting its default value to "1") since it had no use for use but overhead. You might want to omit this change when pulling.
  • One more thing is that we tried different approaches for image downloads (still not using connectionpool though) but rolled back to what it was at first place - so you might see changes there but without any actual use - so again, i would probably omit these changes as well until we have something solid.

Stefano Dacchille and others added 7 commits July 15, 2011 10:33
Added method setDiskCacheDirectory[193]

Reason:
Using this function when saving to desired storage device - so we could change back the directory

------------------------------------------------------------
------------------------------------------------------------
CachedList:

added method getGenericClass[28]

Reason:
Need to know the generic java.lang.Class of this generic class

-------------------------------------------------------------
-------------------------------------------------------------
BetterHttp:

added method get(String url, HashMap<String, String> params) [198]

Reason:
Need to have some easy way to attach GET parameters

-------------------------------------------------------------
-------------------------------------------------------------
BetterActivityHelper:

Changed method handleApplicationClosing[282]
Added null check for tasks

Reason:
Sometime there was a nullPointerException

-------------------------------------------------------------
-------------------------------------------------------------
ImageLoader:

- Added method "decodeByte"
- Changed method "downloadImage"
- Added const "DEFAULT_IMAGE_MAX_SIZE"

Reason:
Needed to set a maximum image size when decoding byte[] to
bitmaps. This is important when dealing with a lot of images
which may consume too much memory

** COMMENTED OUT THIS CHANGE - maybe good for future use...

--------------

Added method  start(String imageUrl, ImageLoaderHandler handler, boolean enableDummyImage)

Reason:
In some cases we don't want to apply a dummy image that will replace our old one while downloading
an image (like in SimpleWebImageView)

-------------------------------------------------------------
-------------------------------------------------------------
WebImageView:

Added method "getImage"

Reason:
Sometimes we need the underlying ImageView so we could operate
straight on it (like setting a color filter)

-------

Added method "getLastImageUrl"

Reason:
In some cases when we recycle this class (such as in FourStateGallery)
we try to reassign the same image - which is useless if the old image
is the same as the new

-------------------------------------------------------------
-------------------------------------------------------------
General changes:

- When the cache memory is enabled the default venue is tested to see if it has enough space if not than the secondary venue is tested and if it also fails than a message is logged.
- when a file is written to the cache a test is run to see if there's enough space and if not a secondary venue is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant