I want to dynamically create TableRow in TableLayout. There are two items in Table Row: TextView and CheckBox. I'm going to give a weight of 1 for the text view I don't know how to search the document.
android layout textview android-layout-weight
TextView tv = new TextView(v.getContext());
tv.setLayoutParams(new TableLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1f));
You can do it like this. 1f of the last parameter is the value of weight.
© 2024 OneMinuteCode. All rights reserved.