摘要: 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);//设置形状为矩 阅读全文
posted @ 2012-05-03 10:23 狂热与执着 阅读(2669) 评论(0) 推荐(0) 编辑
摘要: 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())); 阅读全文
posted @ 2012-05-03 10:16 狂热与执着 阅读(475) 评论(0) 推荐(0) 编辑