Witam, mam prosta tabelke w xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout
android:id="@+id/table"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:stretchColumns="*"
android:shrinkColumns="3">
</TableLayout>
</LinearLayout>
I kod:
ArrayList<String> headers = new ArrayList<>();
headers.add("TEKST");
headers.add("TEKST");
headers.add("TEKST");
headers.add("NIECO DLUZSZY TEKST");
for(int i = 0; i < headers.size(); i++) {
TextView header = new TextView(getApplicationContext());
header.setText(headers.get(i));
header.setTextColor(Color.WHITE);
header.setBackgroundColor(Color.rgb(24, 116, 205));
header.setPadding(15, 15, 15, 15);
header.setTextSize(20);
headerRow.addView(header);
}
Niestety jak widac wysokosc pozostalych komorek nie zwieksza sie do tej najwiekszej. Jak to poprawic?
https://sketch.io/render/sketch56bdb0f52a3e1.png
Pozdrawiam