I have three autoCompleteTextView
box as home
, work
, other
.
So in home autocomplete box i get a data from server and select one item and that item i stored to home_latlong
string. Similarly i have to get value from other autocomplete work which i am storing that value in another string called home_latlong
. Below code shows onItemClick
overridden function where i will store home_latlong
or work_latlong
.
`
ontemClick(AdapterView<?> adapterView, View view,
int position, long id) {
System.out.println("POSITION ="+position);
for (int i = 0; i < latlong.size(); i++) {
if(i==position){
home_latlong=latlong.get(i);
System.out.println("ARRAY"+latlong.get(i));
}
}
}`
So problem is i am not able differenciate when i will store home_latlong
and when to store work_latlong
. I tried with id of autocompletetextview
but it did not help in this function.