1
A
回答
1
使用以下代碼替換onDraw(Canvas canvas)方法。
@Override
protected void onDraw(Canvas canvas)
{
canvas.drawColor(Color.WHITE);
int cx = 240; // screenWidth/2
int cy = 400; // screenHeight/2
Paint paint = new Paint();
paint.setTextSize(30);
paint.setColor(Color.BLACK);
paint.setAntiAlias(true);
canvas.drawText("Name: A", 20, 40, paint);
canvas.save();
canvas.rotate(180, 240, 400);
canvas.drawText("Name: B", 20, 40,paint);
canvas.restore();
}
相關問題
- 1. 如何roate surfaceview 90?
- 2. 如何設置SurfaceView
- 3. 如何使用surfaceview
- 4. 如何通過Surfaceview
- 5. 如何使用SurfaceView的Android
- 6. 如何設置ImageView的SurfaceView
- 7. 如何在surfaceview上繪製圖像android
- 8. 如何在SurfaceView中顯示Admob
- 9. Android - 如何在SurfaceView上繪製圖形
- 10. 如何在Activity onResume時刷新SurfaceView?
- 11. 如何在Android上繪製SurfaceView
- 12. 如何在佈局中編輯surfaceView?
- 13. 如何在SurfaceView/View中使用RenderScript
- 14. 如何在SurfaceView上繪製SoftKeyboard keyCodes?
- 15. 如何在SurfaceView中引入對象
- 16. 如何在Android中使Surfaceview隱形?
- 17. 如何在Android中停止SurfaceView?
- 18. 我怎麼能在SurfaceView使用的Soundpool?
- 19. SurfaceView削波我的看法
- 20. ontouch在surfaceview中
- 21. 在surfaceView上繪製
- 22. 在2D動畫surfaceview
- 23. 我如何繪製廣告查看到SurfaceView畫布
- 24. Surfaceview android
- 25. SurfaceView Animation
- 26. SurfaceView KeyEvents
- 27. 從surfaceview
- 28. java.util.ConcurrentModificationException surfaceView
- 29. 從SurfaceView
- 30. Android SurfaceView