HI! im tryng to implement the autocompletetextfield to search in google and after look for the lat/long of the address.
as i understand i add a ListListener to call the service in google who returns the lat/lng for the address auto completed.
my problem is that when i see the textbox's value it didnt return the "autocompleted" it just returns the typed for me.
how i can execute the original Listener and after the one i created?
my code is:
textSearchGoogle.addListListener((l) ->
{
ConnectionRequest conn = new ConnectionRequest()
{
@Override
protected void readResponse(InputStream input) throws IOException
{
InputStreamReader reader = new InputStreamReader(input);
JSONParser parser = new JSONParser();
Hashtable response = parser.parse(reader);
}
};
conn.setPost(false);
conn.setUrl("
https://maps.googleapis.com/maps/api/geocode/json");
conn.addArgument("address", textSearchGoogle.getText());
conn.addArgument("key", apiKey);
NetworkManager.getInstance().addToQueueAndWait(conn);
});
thank you!
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device