Ok, I'm pretty new to Android, but I managed to teach myself the basics, I create an application where you press a button and a new screen opens and it shows a random number, the only problem is I don’t know how to generate and display random numbers , I searched the Internet for ages and found only small pieces of information, this assistant professor really makes sense to me.: /
If someone can help me or even give me some information that should guide me in the right direction, it would be great
EDIT: (for comments below)
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Random Number : " + Math.random());
int random = (int)Math.ceil(Math.random()*100);
setContentView(tv);
Here is the code that I have, where I made a mistake ^^^^: /
source
share