-1

I need help with my application,

I am making an android game and i want it to appear circles or squares on random point on screen. Now the problem I am facing is that i want it to appear by using random.nextint()... I have already made the png pictures, and everything else but i do not know how to get the screen x and y (what i mean is the max x and y) so i can use it in my random. Also how could i make it appear and dissapear every lets say 2 second?

Thanks

Marc B
  • 356,200
  • 43
  • 426
  • 500
Peky5
  • 11
  • 6

1 Answers1

0

Refer to this to get screen size programatically

How do I get the ScreenSize programmatically in android

To make views disappear use Animations, here is an example:

How do I animate View.setVisibility(GONE)

Community
  • 1
  • 1
hrishitiwari
  • 634
  • 7
  • 15