Android-BitmapCache has version 2.1! Hopefully by now you should have heard
about Android-BitmapCache (if you haven’t, have a look at this post here
[http://www.senab.co.uk/2012/12/18/android-bitmapcache-the-rebirth/]).
Since starting development on the library, I’ve been aware that the requirement
of making the usage of the library as seamless and easy as possible. The main
problem is the need for a custom ImageView class. Unfortunately, there is no
reliable way to be notified of when a DrawabEarly last year I bought myself an iPhone, to see what iOS is really like. By
that I mean to see what the quality of iOS apps are compared to Android’s. One
of the apps that I really liked during that time was Facebook’s Camera app,
which was the inspiration for photup. Another reason I created photup was that
it had been a while since I created something, at the time I was working on
agency apps and I wanted to keep myself ‘fresh’.
Fast forward six months to now, and I’m happy with the resultsWelcome to the second instalment of my new Android Snippet series. This one is a
fairly short one as it points out an optimisation which was added in Android
v4.0, but which can be easily backported to your applications for use in
previous versions of Android.
Scenario
Imagine you have a 3-column GridView, each item is properly recycled in the
Adapter, and contains an ImageView filling the View. You load each ImageView
with a Bitmap downloaded from the web, in a background thread, which is cachThis is the first in a new series of posts I’m going to regularly publish
(weekly-ish) of code snippets which could save you a lot of #AndroidDev time.
The first of which is about one of my favourite classes in Android: DateUtils
[http://developer.android.com/reference/android/text/format/DateUtils.html].
It’s Javadoc keeps things nice and short:
> This class contains various date-related utilities for creating text for things
like elapsed time and date ranges, strings for days of the week andA while ago I wrote Android-BitmapMemoryCache, a cache based off of LruCache
which would cache Android Bitmap objects in memory in a clever way. You can get
the full details from this earlier post
[http://www.senab.co.uk/2012/07/01/android-bitmap-caching-revisited/], but the
bottom line is that it knew when a Bitmap was no longer being used, and so would
recycle it.
I left it like that the past 5 months and I knew it worked. I was aware though,
that developers were looking for something a littlAs you may or not know, I released a small library as part of the work I did for
photup (it was actually created before that) which contained an ImageView which
could be scaled, dragged and double-tapped. Even though I released it onto
GitHub about 2 months ago, I haven’t really maintained it since. Until now. I’ve
spent a good few days improving it, making it better and easier to use, and I
think I’ve achieved both in today’s release: v1.1.
Sample Application
I’ve uploaded the sample app to GoIt’s been a while since I posted. Since then, photup has been release to Google
Play, and after some initial slowness has slowly been gaining traction. That was
until last week, when two things happened: Facebook’s Android app updates, and I
released a dodgy update. The Facebook Android app update doesn’t really worry me
that much, it doesn’t do everything I want and I think photup feels much more
intuitive anyway. The dodgy update (v1.5.2) has a bit of a balls-up from me,
basically I enabled sAfter releasing the first beta
[http://www.senab.co.uk/2012/07/09/photup-v0-9-beta-1/] a couple of days ago,
I’ve been busy at work on the second beta.
Changelog:
* Much improved Facebook Session resilience.
* New Login Screen, with logout.
* New Flow to picking photos (checkmark icon at top right to select, press to
view photo).
* New Upload Tab (with Swipe-to-Dismiss completed items) to see which photos
are uploading.
* Improved Notifications. Using Progress Bar for ICS, BigPictuIf you’ve seen my Twitter lately you’ll probably have seen that I’ve been
working on a new app called ‘photup’. The basic premise of the app is to share
your photos to Facebook, nice and simple! The easiest way to think about it is
that it’s a Android port of Facebook’s
Camera [https://www.facebook.com/mobile/camera/] app, just without the
unnecessary News Feed.
Just to be clear, this is not connected in any way with Friendcaster or
OneLouder. There is no common code between the apps (other t