first of all, i already tried this: Continuously increase integer value as the button is pressed
But i had 59 errors, yep, 59, and as i used to use Eclipse which told you CLEARLY what kind of error you had, how to fix it, and Android Studio looks that was made for people with experience... I can't even understand what the hell to do, to fix all errors (btw, when i try to fix something i break 10 more somehow).
So... Given a Button and a TextView how do i do to increase the textview (like a Clicker game for example) and make it stop pressing the same button again: And how do i put the intervals between each "click"
TextView score = (TextView) findViewById(R.id.textView);
score.setText(Integer.toString(i));
Button click = (Button) findViewById(R.id.button2);
click.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
i++;
score.setText(Integer.toString(i));
}
});
By the way... I don't need the solution, i need to understand how exactly Thread or Handlers works, yes everybody will recommend me the Documentation, but i need to see a SIMPLE example explained part by part and i will understand way more than i already do by reading the documentation.