Few days ago I was wanted to start coding a new app, nothing especial, just a example app project. One thing I notice each time I want to start a new project is that the first steps to setup the project properly discourage me from starting it, so I always end up delaying the start date because I don’t want to go through this repetitive process again.
That made me think and I decided this could not happen to me anymore. …
Last week I post about how to create a custom Downloader in the
Picasso library. After posting the article I was told that the next release of Picasso (Picasso 2.4) will have a new API for this purpose.
The new API is called RequestHandler API and It was a PR from Lucas Rocha.
Even If we were able to handle most cases with a custom Downloader. This implementation of the library had some constraints that the new API is coming to solve:
1. Downloader should be implemented just to download, and if we are dealing with local images, the downloader…
Lately, I have been playing with the DropBox’s API and I faced a problem trying to display the image files thumbnails.
I didn’t have the URL of the thumbnail, so I couldn’t use it directly with Picasso as I used to do:
Picasso.with(context).load(imageUrl).into(imageView);
When you request a folder content from the Dropbox API, you get the files metadata. One of the metadata values is called `thumbExists`, it indicate whether exist or not a thumbnail associate with this file. …
On my library ListBuddies I had to achieve this effect, where the ListView auto-scroll if the user is not interacting with it.
My first approach to do so was this one.
To be honest I never liked this approach, the fact of manually create a timer and handle it myself stopping and restarting was pretty ugly.
I was really annoyed each time I looked at the code, so I decide that this implementation needed to change to a more elegant way.
Thinking about implementation possibilities, it came to my mind the AutoScrollHelper class. It is is a utility class for…
Couple of weeks ago I did a small library called FlabbyListView, this library consist in a ListView whose cells are not rigid but flabby and they react to the list scroll and user touch events.
With this post I am going to try to explain the way I achieved this effect. It is divided in 5 sections:
1. DrawArc vs cubicTo: How to draw an arc in a canvas, which can have different heights and keep its width.
2. Drawing shapes: How to draw the shape we want with the arc drawing technique we saw before.
3. Clipping: How to…
One of the most common cases in android development is the need of loading images on screen. If we don´t load them in an efficient way, then we can quickly consume the amount of memory assign to our application, causing the famous OutofMemoryError.
java.lang.OutofMemoryError: bitmap size exceeds VM budget.
But in this post I am not going to speak about how to manage bitmaps in the android platform. We can find a good explanation of how to Display Bitmaps Efficiently on the android documentation, and also a really awesome 3rd party libraries for this. …
Android language writer and translator