Strange, I just copied the above code into a test project with a relative layout, renamed some button variables such that the code compiles, and all three button showed up horizontally aligned, and no Exception appeared. So it was working ...
edit: happy to hear that it is working