Back to project page MapsDemo.
The source code is released under:
Apache License
If you think the Android project MapsDemo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.infy.dheeraj.mapsdemo; /*w w w . java2 s. c om*/ import android.app.DialogFragment; import android.os.AsyncTask; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; public class EnterAddress extends DialogFragment implements OnClickListener{ private View fragView; private EditText address; private Button setClick; private Button cancelClick; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { fragView=inflater.inflate(R.layout.map_enter_address, null); address=(EditText)fragView.findViewById(R.id.editText1); setClick=(Button)fragView.findViewById(R.id.button1); cancelClick=(Button)fragView.findViewById(R.id.button2); setClick.setOnClickListener(this); cancelClick.setOnClickListener(this); return fragView; } @Override public void onClick(View v) { switch(v.getId()) { case R.id.button1: break; case R.id.button2: break; } } /* private class HttpRequestTask extends AsyncTask<Void, Void, Greeting> { @Override protected Greeting doInBackground(Void... params) { try { final String url = "http://rest-service.guides.spring.io/greeting"; RestTemplate restTemplate = new RestTemplate(); restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter()); Greeting greeting = restTemplate.getForObject(url, Greeting.class); return greeting; } catch (Exception e) { Log.e("MainActivity", e.getMessage(), e); } return null; } @Override protected void onPostExecute(Greeting greeting) { TextView greetingIdText = (TextView) findViewById(R.id.id_value); TextView greetingContentText = (TextView) findViewById(R.id.content_value); greetingIdText.setText(greeting.getId()); greetingContentText.setText(greeting.getContent()); } }*/ }