Skip to content
Advertisement

How can I create a button for clickable many times on android?

I triying make a android app for learning but my buttons clickable only once. I can’t click second time. Here is my codes for button.

There is the xml codes:

JavaScript

And there is java codes:

JavaScript

There is generate method:

JavaScript

There is variables:

JavaScript

Advertisement

Answer

After calling generate() the first time password.length() < 16 will always be false. Put String password inside generate():

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement