Click here to Skip to main content
15,665,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually I want to see if there is a way to tell if two widgets are close to each other (i.e. side by side) on the screen and I can program some interactions when that happens.

Also, I want to know if I can tell whether the two widgets are on the same home screen (with multiple home screens, they may not be showing on the same screen page).


1 solution

Perhaps you are looking for the Layout parameters[^]. Use them to determine where your activity or widget is residing on the screen. You would determine where your application is, thus checking whether they are side-by-side or not.

The second question can be answered by the launcher being used. If launcher exposes the details about widgets and apps on the screen then you can get the information.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900