I have a textview that I want to change the width to match_parent and height to remain at wrap_content. It is nested within a horizontal linearlayout. It is the 2nd in 3 textvie
What is your TextView parent layout? Linear, Relative or what? Sample if LinearLayout:
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
homeButton.setLayoutParams(params);
You must create param base on its parent layout.