1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-29 19:20:36 +02:00

Make all table entries at least two lines high

This commit is contained in:
Erik Johansson
2018-02-12 22:12:11 +01:00
parent 8b3461c2b8
commit f2d7b355a8

View File

@@ -512,10 +512,14 @@ public class TableFragment extends Fragment implements FragmentUpdateListener {
for (int i = 0; i < visibleMeasurements.size(); ++i) {
TextView column = new TextView(getContext());
column.setLayoutParams(new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, 1));
column.getLayoutParams().width = 0;
column.setGravity(Gravity.CENTER);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT,
1);
layoutParams.width = 0;
column.setLayoutParams(layoutParams);
column.setMinLines(2);
column.setGravity(Gravity.CENTER_HORIZONTAL);
if (isSmallScreen) {
column.setTextSize(COMPLEX_UNIT_DIP, 9);