我在android中很新,我想知道如果我在一个布局中不使用“setOnClickListener”,会发生什么情况,因为看起来我的应用程序仍然可以正常运行而没有任何错误。任何人都可以解释我对我?在布局上使用setOnClickListener
例如:
myLayout = (LinearLayout) findViewById(R.id.myLayout);
myLayout.setOnClickListener(this);
myLayout2 = (LinearLayout) findViewById(R.id.myLayout2);
除非您希望布局可点击,否则不需要它。 – PaulG 2014-10-27 20:26:10