Android开发20——单个监听器监听多个按钮点击事件一、单个按钮点击事件的监听
方法一
1.* 从网络上获取图片
2.* @author 徐越
3.public class MainActivity extends Activity
4.private EditText txtPath;
5.private Button btnShowImage;
6.private ImageView imgView;
7.@Override
8.public void onCreate(Bundle savedInstanceState)
9.super.onCreate(savedInstanceState);
10.setContentView(http://doc.docsou.comyout.main);
11.txtPath = (EditText) this.findViewById(R.
id.txtPath);
12.btnShowImage = (Button) this.findViewById
(R.id.btnShowImage);
13.imgView = (ImageView) this.findViewById(R
.id.imgView);
第 1 页