多按钮的点击事件其实与只有一个是类似的,只不过要在调用onClick()时进行判断,判断获取到的component是谁即可。packagecom.example.yeman.slice;importcom.example.yeman.ResourceTable;importohos.aafwk.ability.AbilitySlice;importohos.aafwk.content.Intent;importohos.agp.components.Button;importohos.agp.components.Component;importohos.agp.components.Text