全国城市检索
package cc.lifelink.cn; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget.AdapterView; import android.widget.AdapterView.OnItemSelectedListener; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.PopupWindow; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; public class City_cnActivity extends Activity { private DBManager dbm; private SQLiteDatabase db; private Spinner provinceSpinner; private Spinner citySpinner=null; private Spinner districtSpinner=null; private String province=null; private String city=null; private String district=null; /*------------------*/ // private TextView provinceView; // private TextView cityView; // private TextView districtView; // private ImageView provinceImageView; // private ImageView cityImageView; // private ImageView districtImageView; // // private PopupWindow mPopupWindow; // private ListView provinceListView /*------------------*/ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); provinceSpinner=(Spinner)findViewById(R.id.spinner1); citySpinner=(Spinner)findViewById(R.id.spinner2); districtSpinner=(Spinner)findViewById(R.id.spinner3); provinceSpinner.setPrompt("鐪?鐩磋緰甯?); citySpinner.setPrompt("鍩庡競"); districtSpinner.setPrompt("鍦板尯"); provinceSpinner.setOnItemSelectedListener(new ProvinceOnSelectedListener()); districtSpinner.setOnItemSelectedListener(new DistrictOnSelectedListener()); citySpinner.setO
用户评论