button = new Button (this);
button.setText("Insert values");
tableLayout.addView(secondo);
button.setOnClickListener(new OnClickListener(){
public void onClick(View arg0) {
for(int i = 0; i < r1; i++){
for(int j = 0; j < c1; j++){
//insert values from a matrix of edittext in array
array[t] = Integer.parseInt(values[i][j].getText().toString());
t++;
}
}
}
});
I want to put in this code a control on the input of values by edittext, that show me an alert when the values in input is incorrect, because now the app crash when the input is incorrect. Thanks
1 Answer