I have a job. You must have access to the view that covers the toast. You can basically capture touch events going to Toast. Then change the MotionEvent X and Y. Then send the MotionEvent to the hidden view. It seems a bit hacked to me, but it works. I would have thought it would be better to change the flags on the toast, but I cannot find them.
In action, a Toast is created:
final Taost toast = Toast.makeText(this, "Text", Toast.LENGTH_LONG); final View myCoveredView = findViewById(R.id.my_covered_view); final View toastView = toast.getView(); toastView.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(final View v2, final MotionEvent event) {
If anyone has a better way, I would love to be here.
theJosh
source share