画一个倒三角
public class ArrowView extends View{private Context mContext = null;@Overrideprotected void onDraw(Canvas canvas) {Path path = new Path(); path.moveTo(0, 0); path.lineTo(getWidth(), 0); path.lineTo(getWidth()/2, getHeight()); path.lineTo(0, 0); ShapeDrawable circle = new ShapeDrawable(new PathShape(path, getWidth(), getHeight())); circle.getPaint().setColor(mContext.getResources().getColor(R.color.download_bg_menu)); circle.setBounds(0, 0, getWidth(), getHeight()); circle.draw(canvas);super.onDraw(canvas);}public ArrowView(Context context, AttributeSet attrs) {super(context, attrs);mContext = context;}}
?