public class AndroidsCastleActivity extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new MyView(this)); } class MyView extends View { public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { Paint paint = new Paint(); paint.setColor(Color.RED); canvas.drawText("ハローAndroid!!", 10, 20, paint);//テキスト描画 Path path = new Path();//パスを作って円を追加 path.addCircle(150, 150, 60, Direction.CCW); paint.setTextSize(30); //テキストサイズセット canvas.drawTextOnPath("Androidプログラミング", path, 10, 20, paint);//テキスト描画 } } }
Portions of this page are modifications
based on work created and shared by Google and used according to terms
described in the Creative Commons 3.0 Attribution License.
- Remical Soft -