Home > Software design >  Passing an 'onTouch' event to an activity below Android
Passing an 'onTouch' event to an activity below Android

Time:08-02

I have an activity A. Activity B is partially transparent (so I can see activity A below).

Is there an option in Android to allow a user to interact with Activity A while B is still in front?

I want to leave activity B in front the whole time, but allow the user to interact with screen A.

overriding the implementation of onTouch or onClick in B so I can pass the event to activity A?

CodePudding user response:

in my experience there is nothing like this. So, you must close activity A and B can be clickable or something.

CodePudding user response:

This is not possible and will not be, because it's a security concern. This on web is called clickjacking. The reason that this is not possible is because you could theoretically manipulate the user to do something unintended like deleting a file or similar, just by guiding them on where to click on a fake screen.

  • Related