Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Bitmap redApple = BitmapFactory.decodeResource(getResources(), R.drawable.redApple );
  2. Bitmap basket= BitmapFactory.decodeResource(getResources(), R.drawable.basket);
  3.  
  4. protected void onDraw(Canvas canvas) {
  5. super.onDraw(canvas);
  6. canvas.drawBitmap(redApple , 0,chaningY, null);
  7. canvas.drawBitmap(basket,x,y, null);
  8. if(y < canvas.getHeight() ) {
  9. y+=10;
  10.  
  11. }else
  12. {
  13. y= 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement