Android Color Banding

Many Android programmers encounter severe color banding on devices like the Nexus One. For example, here is a radial gradient in an app I wrote this morning.

Banding on a Nexus One

There is an awful lot of misinformation out there, for example I see many people advocating dithering as a solution. Here is my app with dithering enabled:

Nexus One with Dithering

This is better, but won’t look so hot with many bitmaps. The correct solution is to take note of the format. As shown in the above images, Android’s default format is PixelFormat.OPAQUE. You can change this in a few ways. One way is to create a custom theme and set android:windowBackground to a color.

Another solution is to programmatically call Window.setFormat(PixelFormat.RGBA_8888).

The end result:

Eliminating Color Banding on the Nexus One

Sample code:

 public class MyActivity extends Activity {   @Override   public void onAttachedToWindow() {     super.onAttachedToWindow();     Window window = getWindow();     // Eliminates color banding     window.setFormat(PixelFormat.RGBA_8888);   } } 

HTC EVO Review

The EVO is a great phone with poor software choices.

Like

  • The kickstand on the back
  • HDMI port
  • Front facing secondary camera
  • The huge display
  • Fast processor

Do Not Like

  • Pre-loaded apps on the system partition cannot be removed
    • Footprints, Friend Stream, HTC Mobile Guide, NASCAR Sprint Cup, Peep, Qik, Quickoffice, Sprint Football, Sprint Zone, Sprint Navigation, Sprint TV, and many others
    • Many of these apps are configured to automatically start, so less savvy users will experience reduced battery life and slower performance.
    • Even disabling and removing apps from the home screen leaves the “all applications” list cluttered.
  • The hardware buttons (home,menu,back,search) are easy to mistakenly hit. If you get a chance to try this phone, try tapping the bottom edge of the phone completely outside of the home button’s bounds. Your tap will still register!
  • The dialer is not Android standard. The HTC replacement is cluttered and harder to navigate.
  • The large size is nice, but the corners should be more rounded, like the Nexus One. The boxy shape of the EVO makes it feel even larger than it is.
  • The soft keyboard is not Android standard, and it is cluttered.
  • *** UPDATE: InputMethod full screen mode fails to show a “Next” button, even when android:imeOptions="actionNext" is specified as an EditText attribute. This means when users are entering text in landscape mode, they don’t see the Next button, resulting in a very confusing UI.
  • This phone has no trackball. When editing, you see a bunch of extra soft key arrows on the keyboard for navigation. These arrows add complexity:

HTC EVO Keyboard

Android makes vendor customizations possible and this phone demonstrates just how poorly that can be done.