在自定义的SurfaceView 上打开 DialogFragment
myDialogFragment.show(((AppCompatActivity) getContext()).getSupportFragmentManager(), "text");
@Override
public boolean onTouchEvent(MotionEvent event) {
boolean show = true;
if (show) {
AboutDialog aboutDialog = new AboutDialog(getContext());
aboutDialog.show();
Toast.makeText(getContext(), "xxxxxxxxxx", Toast.LENGTH_SHORT).show();
} else {
MyDialogFragment myDialogFragment = new MyDialogFragment();
myDialogFragment.item("99");
myDialogFragment.show(((AppCompatActivity) getContext()).getSupportFragmentManager(), "text");
}
return true;
}