• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Draw at (x,y) Coordinates

cmh0114

Well-Known Member
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.
 
Use a Drawable class (like BitmapDrawable) and call setBounds with the coords, then call draw.
 
Back
Top Bottom