1. Download our Official Android App: Forums for Android!

Apps Draw at (x,y) Coordinates

Discussion in 'Android Development' started by cmh0114, Jul 5, 2010.

  1. cmh0114

    cmh0114 Well-Known Member
    Thread Starter

    Jan 10, 2010
    Are there any methods for Android that will allow you to draw an image at a given (x,y) coordinate? I'm looking to use this for a game that has objects constantly flying across the screen. Instead of creating a separate layout for each instance of the loop, it will just recalculate the x,y coordinates of the object and redraw it when the window is refreshed at the next iteration.
    Of course, I'm open to other suggestions on how to do this as well. I'm new to programming for Droid, and I'm really unsure how to display images in many cases.


  2. Use a Drawable class (like BitmapDrawable) and call setBounds with the coords, then call draw.

Share This Page