Chris Banes

Chris Banes
Website

New blog... again

Just a quick post. You may have noticed that this site has changed yet again. After my Color Matching [http://chris.banes.me/2014/02/18/colour-matching/] post last week, I saw quite a few comments saying that the site was slow. The site was WordPress based with all of the standard optimizations: W3 Total Cache [http://wordpress.org/plugins/w3-total-cache/] for static caching and then CloudFlare [http://www.cloudflare.com] for it’s CDN goodness. Even though it had these, the site was still pai
Chris Banes
Color extraction

Colour Matching

Android 4.4 introduced more subtle use of colour throughout the OS and provided new guidance on using colour [http://developer.android.com/design/style/branding.html#color] in your applications to provide better branding (see this episode [http://www.youtube.com/watch?v=6QHkv-bSlds&list=PLWz5rJ2EKKc8j2B95zGMb8muZvrIy-wcF&feature=share&index=3&t=3m25s] of ADiA for more discussion). This means that the onus is now on you as a designer/developer to inject some colour into your app to make it stand
Chris Banes
Android Libraries, Pull to Refresh

(My) Open Source Libraries

Over the past few months I've been receiving a ton of emails, tweets, G+ mentions and GitHub issues in connection with my open source libraries. So I thought I would set out what my plan is for them in the future, and the order in which I'll be tackling the backlog. ActionBar-PullToRefresh The library which is taking up the majority of my personal dev time at the moment before it hits v1.0. I've done this library a bit differently that my previous ones as I've developed it in the open, whereas
Chris Banes
Android Libraries, Maven

Pushing AARs to Maven Central

Over the past few weeks I've been updating ActionBar-PullToRefresh [http://github.com/chrisbanes/ActionBar-PullToRefresh] for the release of v0.7, but have been a bit blocked on publishing the library as an Android Archive (aar) to Maven Central [http://search.maven.org/]. It was the number one issue/request that I received, and while I had a working local Gradle build I could not find an easy way to publish the results. There a few solutions out there but nothing really definitive. The main s
Chris Banes
Android Libraries, Pull to Refresh

ActionBar-PullToRefresh

So this is my first blog post on ActionBar-PullToRefresh. I've been mainly talking about it on Google+ up until now as it simply was not ready for production use. Well today I tagged and push v0.4 of the project, which adds the main missing feature: automatically styling based on your Action Bar style. First of all here's a video of how it works: Features So here's a non-exhaustive list of it's features: * By default mirrors the Gmail implementation: grow from center progress bar. * ListVie
Chris Banes

IntelliJ Copyright Profile for Android

One of things that I keep finding myself doing is creating copyright profiles in IntelliJ for my open source projects. If I move to a new machine, I have to do it all over again. So I thought I’d write a quick blog post, more for my reference than anything but hopefully you’ll find it helpful too. Scope The first thing you need to do is create a ‘Scope’. This is basically a filter of files within your project which the copyright profile should update. For Android projects I the following filter
Chris Banes
Android Views

Checkable Views

After a month of not posting anything on here due to being busy, I’ve finally found a bit of time to write a new Snippet post. This post is all about Checkable [https://developer.android.com/reference/android/widget/Checkable.html], and how to properly implement the interface so that your views display as you expect them to. What’s Checkable? Checkable is an interface which can be implemented when your View needs to change state based on a boolean switch. The framework contains a few views whi
Chris Banes
ListView, Android Views

ListView - Keeping Position

Last week Joaquim Verges [https://plus.google.com/107942105369460253496] asked me a question about ListView. I’ve finally got around to writing up this solution and post. The Problem To paraphrase Joaquim, the problem is: > I have a ListView populated from a CursorLoader. When I swap to a cursor with new items on top, I use setSelectionFromTop() [https://developer.android.com/reference/android/widget/ListView.html#setSelectionFromTop(int, int)] to keep the ListView at the same visible position
Chris Banes
Pull to Refresh, Android Libraries

Android-PullToRefresh – Stopping Development

Android-PullToRefresh was started about 18 months ago, as I needed it for a project (Friendcaster). Since then I’ve kept maintaining the project, pushing it forward and adding new features. Well today I’m stopping development. There are two reasons for this, the first is that it is feature complete. The second reason is that the volume of ‘issues’ I get is taking up too much of my time. At the end of the day, it’s open source. If you want something added or fixed, you have the source to do so.
Chris Banes