1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-26 01:43:59 +02:00

Make center gravity work when editing text

With MATCH_PARENT, the weight text would jump to the top when editing
it while the evaluator row was visisble.
This commit is contained in:
Erik Johansson
2018-01-21 22:35:44 +01:00
parent bcd6d4ed24
commit ca070558e4

View File

@@ -111,7 +111,7 @@ public abstract class MeasurementView extends TableLayout {
valueView.setTextColor(Color.BLACK);
valueView.setGravity(Gravity.RIGHT | Gravity.CENTER);
valueView.setPadding(0,0,20,0);
valueView.setLayoutParams(new TableRow.LayoutParams(0, LayoutParams.MATCH_PARENT, 0.29f));
valueView.setLayoutParams(new TableRow.LayoutParams(0, LayoutParams.WRAP_CONTENT, 0.29f));
incDecLayout.setOrientation(VERTICAL);
incDecLayout.setVisibility(View.GONE);