How to get the previous or next view
You can use the ViewGroup
instance that's acting as a container for your widgets to do this.
See getChildAt(int) and indexOfChild(View)
So getChildAt(indexOfChild(v)+1)
will get you the next view.
So something like
ViewGroup container = (ViewGroup) findViewbyID(R.tableRow1);
View slideBtn = findViewbyID(R.remoteLight);
View nextView = container.getChildAt(container.indexOfChild(slideBtn)+1);
You should add checks for overflow and that the next view is of the type that you do in fact want.