ShapeDrawable.inflateTag() handles the 'padding' tag with the standard attributes android:left, etc. The attribute values for these standard attributes should be dimension specifications, e.g. '4dp'. ShapeDrawable.inflateTag() was wrongly parsing the attribute values as plain integers.