// Viewを継承した無名クラスの定義・生成
View child = new View(this) {
@Override
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
Bitmap icon1 = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
Bitmap icon2 = BitmapFactory.decodeResource(getResources(), R.drawable.icon);
Paint background = new Paint();
background.setAlpha(255);
canvas.drawBitmap(icon1, 0, 0, background);
canvas.drawBitmap(icon2, icon1.getWidth(), 0, background);
canvas.drawColor(Color.TRANSPARENT);
}
}
Sabtu, 04 Desember 2010
Bitmapを水平に並べて描画
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar