i get a error when i have the int [poition] in the textdescription1.setText()
the error i get is (The type of the expression must be an array type but it resolved to int)
i don’t why i get that error becuse it’s an array and [position] is a int.
Does anyone know why i get this error and how to fix it?
sorry for my bad english 😛
thx
public void onItemSelected(AdapterView<?> parent, View v, int position,
long id) {
txtdescription1.setText(R.array.banan[position]);
}
You get your array in the following method:
if banan is of String type then change accordingly