This is my first application in android. I would like to know if this is the best way to do it.I am trying to load a autocomplete textview with the data from mysql db. This data is retrieved from db based on text user enters.
This is the way I am doing it.
1.added a textwatch listener to the autocomplete view. In afterTextchanged method, I am calling an asynchronous task, which connects to db using a php web service and retrieves data from mysql table and loads in a array. On post execute of that task,I am setting the adapter.(Array Adapter).
My question is that, aftertextchanged is invoked for every single letter entered/modified, db call happens here. So, keeping all the database code here, is it good.? It takes time to load the list as well.
Is there any other best way of doing it.
Thanks for your response.