I have a very simple layout that I can\'t make it looks like I want. It\'s a LinearLayout with a button and a Switch. I want them to show one above the other, but I want their w
int params = linearLayout.getWidth()/2; ViewGroup.LayoutParams( params, ViewGroup.LayoutParams.WRAP_CONTENT));