⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mymap.java

📁 在android上实现google map
💻 JAVA
字号:
package com.android.myMap;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.View;import android.widget.Button;import android.widget.EditText;public class myMap extends Activity {	protected static final int REQUEST_SEND_DATA = 0;	/** Called when the activity is first created. */    @Override    public void onCreate(Bundle icicle) {        super.onCreate(icicle);        setContentView(R.layout.main);        getAndSendCityName();    }        public void getAndSendCityName()    {       Button btn = (Button)findViewById(R.id.confirm);       btn.setOnClickListener(new View.OnClickListener()        {           public void onClick(View v)           {        	   EditText edt=(EditText)myMap.this.findViewById(R.id.edt);        	           	   Intent intent = new Intent();               intent.setClass(myMap.this, ShowGmapView.class);               if(edt.getText().length()!= 0) {            	   String data = edt.getText().toString();            	   String name="data";            	   intent.putExtra(name, data);                                 	   startActivity(intent);               }           }       });                    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -