private int i = 0;// Declare i as private
…..
TextView tv = (TextView)findViewById(R.id.tv01);
Btn.setOnClickListener(new OnClickListener() {
public void onClick(View v)
{
i = i+10;
tv.setText( String.valueOf(i));
}
});
0
solved Add a number to a textView using button onClick()