Wednesday, March 23, 2011

Creating a simple border with rounded corners for a layout or view

not the border in question..


Hi all, just thought I'd post this simple snippet that I've just found.
This allows you to simply add a border ( even with rounded corners!) to a layout or view.

All you need to do is create a new xml file somewhere in /res/drawable called 'the_border.xml'
with this or similar as the contents:

<shape xmlns:android="http://schemas.android.com/apk/res/android"> 
    <stroke android:width="1dp" android:color="#FFFFFF" /> 
    <padding android:left="7dp" android:top="13dp" 
            android:right="7dp" android:bottom="17dp" /> 
    <corners android:radius="4dp" /> 
</shape> 

You can then reference this as the background of an item in your layout like this (in xml)

android:background="@drawable/the_border"

or like this in code:

llErrorMessage.setBackgroundResource(R.drawable.the_border);

Nice eh?

Wednesday, March 16, 2011

My new Android app, 'Herbert the Herb & Spice Helper' now available on the Android Market



My new Android app, 'Herbert the Herb & Spice Helper' is now available on the Android Market.


Here's the blurb: "With over 70 herbs and spices, 50+ ingredients and 19 different meal styles, you'll never be lost in your kitchen again.
Herbert the Herb & Spice Helper allows you to mix and match ingredients and meal styles to see what combinations are best.
Each herb and spice comes with a list of compatible herb and spices, and also what you can use instead, so you don't have to run to the supermarket at the last moment."


Oh what? You want screenshots?
Ok, here you go:








A veritable bargain at only 99c AU
Get it here.