摘要:
int r=8;//圆角的半径int color=Color.parseColor("#88aa77");int bottom=Color.parseColor("#669966");GradientDrawable mDrawable;mDrawable = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] { color,bottomColor});mDrawable.setShape(GradientDrawable.RECTANGLE);//设置形状为矩 阅读全文
摘要:
Bitmap bitmap=BitmapFactory.decodeResource(context.getResources(),R.drawable.feedback_content_header_bg);//取得资源NinePatch npd=new NinePatch(bitmap,bitmap.getNinePatchChunk(),null);npd.draw(canvas,new Rect(0,0,canvas.getWidth(),canvas.getHeight())); 阅读全文