Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以创建一个按钮,其背景可绘制是布局?例如,我想创建一个包含一些水平图像和一些文本视图的布局,并且所有生成的视图都应该可以作为一个按钮一次全部点击。有可能吗,怎么做?
谢谢你。
LinearLayout yourLayout = (LinearLayout) findViewById(R.id.your_nested_layout); yourLayout.setOnclickListener(...);