Android开发20——单个监听器监听多个按钮点击事件
一、单个按钮点击事件的监听 方法一 /** *从网络上获取图片 * *@author徐越 * */ publicclassMainActivityextendsActivity { privateEditTexttxtPath; privateButtonbtnShowImage; privateImageViewimgView; @Override publicvoidonCreate(BundlesavedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); txtPath=(EditText)this.findViewById(R.id.txtPath); btnShowImage=(Button)this.findViewById(R.id.btnShowImage); imgView=(ImageView)this.findViewById(R.id.imgView); btnShowImage.setOnClickListe...