Skip to content

Instantly share code, notes, and snippets.

@searover
Created April 12, 2015 10:40
Show Gist options
  • Save searover/d09f7f60a8aa670450b3 to your computer and use it in GitHub Desktop.
Save searover/d09f7f60a8aa670450b3 to your computer and use it in GitHub Desktop.
A TypeArray usage
TypedArray array = context.getTheme().obtainStyledAttributes(attrs,
R.styleable.PieChart,0,0);
try {
mShowText = array.getBoolean(R.styleable.PieChart_showText,false);
mTextPos = array.getInteger(R.styleable.PieChart_labelPosition,0);
}finally {
array.recycle();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment