添加onViewCreated的Touch事件监听, 以解决叠在一起的fragment上层响应下层的按钮点击事件解决方法
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
view.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
super.onViewCreated(view, savedInstanceState);
}
}
时间: 2024-10-04 17:51:35