Oh I agree. Performance is not what bothers me. It's the use.
I attached to this post the Switch library (copied from post #1, with two properties added: Left and Top) and a test project.
My steps:
1) I create a layout with the switch in the middle.
2) I open the layout with LoadLayout. Ok, my switch is loaded and it appears where I placed it.
3) I set its left and top properties to move it to the top left corner, but it does not move. It's logical: it's embedded inside a panel, so its coordinates are not relative to the activity but to this panel. I have to move the panel (cumbersome!). The problem is that I have no access to this panel. And getParent, with the Reflection library, raises an error.
So how can I move the view dynamically?