Another Android Blog

Insights into those hard to solve Android Development problems

Skip to: Content | Sidebar | Footer

Category: Components

Button Hit Area for Custom Graphics

1 July, 2011 (14:13) | Components, UI Design | By: Randall Mitchell

I decided to create an “irregularly shaped” and small arrow image to be used as a button. The problem was, when I set it as a background image, the hit area only reported when the actual image was being hit. The quick fix is to use a drawable inset to create a bounding box around [...]

Drop Shadow LinearLayout

29 June, 2011 (09:23) | Components, UI Design | By: Randall Mitchell

I thought I would share this quick tip I just cooked up. To create a drop shadow below a layout component, you can add a “view” of the same width immediately below that component and set the background of that view to a drawable xml file containing a gradient. Here is an example layout file [...]

Custom Composite Android Component

26 May, 2011 (20:58) | Components | By: Randall Mitchell

This example puts a couple of TextViews into a LinearLayout. The combination of components is then treated as one component with the added functionality of programmatically changing the text of the two TextViews.

A Simple ListView Example

11 June, 2010 (15:12) | Components | By: Randall Mitchell

The ListView is given very little documentation at Android.com. I thought I could explain a little further how a ListActivity class functions. This is a simple example and I may decide to create a more advanced tutorial on this topic in the future. So let’s get to coding.