[android-developers] Re: Game Development
Did you try using this method here:
@Override
protected void onDraw(Canvas canvas)
{
super.dispatchDraw(canvas);
paint(canvas);
}
For more information download the source code of this book here:
http://www.apress.com/book/downloadfile/4504
Thanks,
Maxood
http://www.maxood-android-corner.blogspot.com/
On Jul 5, 9:13 pm, android_interest <kar...@gmail.com> wrote:
> Hello,
> I have following example code:
>
> ....
> Character c =
> CharacterFactory.getCharacter(CharacterEnum.SpecialCharacter);
> //factory has applicationContext reference to get bitmaps from R.
> ...
> Paint bitmapPaint = new Paint();
> ...
>
> View::onDraw(Canvas canvas)
> ...
> canvas.drawBitmap(c.bitmap(), 0, 0, bitmapPaint);
> ...
>
> For some reason (must be something simple) I do not see the bitmaps at
> the 0,0 of the canvas.
>
> Inspecting the bitmap and etc does not show anything obvious (nulls),
> I must have missed something...
>
> Is there something I should be paying particular attention to while
> drawing bitmaps?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home