Home I want to randomly "spawn" an image five times what am I doing wrong?
Reply: 0

I want to randomly "spawn" an image five times what am I doing wrong?

Lexer Ivan King Sodela
1#
Lexer Ivan King Sodela Published in 2018-02-14 10:04:50Z
for(int i = 1; i < 5; i++) {
    Random random = new Random();
    x = random.nextInt(width-1)+1;
    y = random.nextInt(height-1)+1;
    ImageButton tap = findViewById(R.id.redtap);
    tap.setX(x);
    tap.setY(y)
}

I don't know what to do so I asked here.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.329761 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO