0
我無法在自定義TextView類中繪製任何東西。無法在TextView的onDraw中繪製線條
對不起,這不是真的,它在埃克萊爾工作,但不是蜂窩!
onDraw()
方法肯定被調用,但沒有任何東西正在繪製(在蜂窩中)。
這是我的onDraw方法。
super.onDraw(canvas):
this.bluePaint.setColor(getResources().getColor(R.color.actionBlue));
float pix = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 6, getResources().getDisplayMetrics());
this.bluePaint.setStrokeWidth(pix);
canvas.drawLine(0,0,this.getWidth(),20,this.bluePaint);
在Eclair中Honeywell的onDraw處理方式不同嗎?我錯過了什麼嗎?
在此先感謝
Honeycomb爲UI元素添加了GPU加速,所以在處理方式上肯定有不同。 – Budius