I putting an in-game chat module into an app. I am adding text messages as they are received into a LinearLayout view. I want to set the layout params to the TextView but th
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams( /*width*/ ViewGroup.LayoutParams.MATCH_PARENT, /*height*/ ViewGroup.LayoutParams.MATCH_PARENT, /*weight*/ 1.0f ); YOUR_VIEW.setLayoutParams(param);