Android:9patch
The Draw 9-patch tool allows you to easily create a NinePatch graphic using a WYSIWYG editor. For an introduction to Nine-patch graphics and how they work, please read the section about Nine-patch in the 2D Graphics document.
나인패치 canvas에 직접 그리는 방법
Bitmap mBubbleBitmap = BitmapFactory.decodeResource(ctx.getResources(), R.drawable.scrollbar_handle_horizontal);
NinePatch sc = new NinePatch(mBubbleBitmap, mBubbleBitmap.getNinePatchChunk(), "");
sc.draw(canvas, new Rect(0,0,100,100), mPaint);