EditText[] t;
t[0].setVisibility(View.VISIBLE);
t[1].setVisibility(View.VISIBLE);
You have created the array t, but it does not contain anything. So t[0], t[1] etc. do not exist. You must add references to actual
EditText
items in each entry that you are trying to use. Something like:
EditText[] t = new EditText[6];
t[0] = new EditText;
t[0].setVisibility(View.VISIBLE);