this is a game, and this game have a certain number of rounds, i want to click that button only the number of rounds the player selected.
this is my function, that saves the last 2 words from a input string, and shows on a textfield, i just want to run this function the number of "introndas"... i tried adding that last part of the code with "next.setEnable(False)"... but did nothing... Thanks guys
public void onClick (View v){
edText1=findViewById(R.id.txtatual); int introndas = Integer.parseInt(nrondas); String aux=guardatexto(); String str[] = aux.split(" "); int lenghtofstr = str.length; if(lenghtofstr >=2){ lword=str[lenghtofstr-1]; pword=str[lenghtofstr-2]; String wordstoshow=pword+" "+ lword; ltextview.setText(wordstoshow); FinalTexto=FinalTexto+" " + aux;} edText1.setText(""); currentnumber++; if (currentnumber == introndas) next.setEnabled(false); else currentnumber = currentnumber + 1; }