bitmap - How to set size of nine-patch drawable programmatically in android -
this how can resize normal bitmap drawable
drawable d = getresources().getdrawable(r.drawable.error); bitmap bm = ((bitmapdrawable)d).getbitmap(); error_indicator = new bitmapdrawable(getresources(), bm.createscaledbitmap(bm, 50, 50, true));
but want know how resize 9 patch drawable. since above code doesnt works me giving me classcastexception saying ninepatchdrawable cannot cast bitmapdrawable.
this nine-patch drawable(hdpi).i have other resolutions icons too
draw 9-patch tool screenshot
app screenshot
android bitmap android-drawable nine-patch
No comments:
Post a Comment