Let's say I want to give the user the ability to resize a view by presenting a white rectangle with dots in the corners which he can drag around. The resizing itself is pretty easy but my problem is the rectangle.
If I place it exactly at the edges of the view then one-quarter of the dots will be cut off. By adding some margin or padding to the target two view next to each other will be pushed away from each other... Also, according to the material design guidelines, a touch target should be 48dp but my dots shouldn't fill that whole space.
So how should I do this? Is all of this possible with a selector or do you need a helper view for this? Also, how would something like this work in a Recaclerview where I can resize items?
If I understood your question correctly.
In your xml file where the dots are add this to a view that is a parent for the dots:
or in code:
This way your dots won't be cut off.