public final int[] getResourceDeclareStyleableIntArray( Context context, String name )
{try
{
//use reflection to access the resource class
Field[] fields2 = Class.forName( mGetPkgName() + ".R$styleable" ).getFields();
//browse all fields
for ( Field f : fields2 )
{
//pick matching field
if ( f.getName().equals( name ) )
{
//return as int array
int[] ret = (int[])f.get( null );
return ret;
}
}
}catch ( Throwable t )
{
}
return null;
}