There seem to be two problems, although it is harder to debug this code than XML.
At first, you were not able to set the vertical orientation for the linear layout. For horizontal orientation, everything will be one line. For vertical layout, each widget will be on a separate line, going from top to bottom.
Secondly, "Fill Parent" looks suspicious. Any filling parent element, unless it allows for relative layout or absolute size, takes care of everything and hides all other widgets. This is almost always the wrong decision. Instead, try using weight.
At first, you can think about exactly how you want to use XML, and then convert it to a program setting, while keeping the conversion as mechanical as possible. Good luck
Charles Merriam
source share