backported to gingerbread

Note: need android support library v7 with resource to compile.