Make ExtraKeysView work on Android 5

This is done by explicitly specifying alignment as GridLayout.FILL
as I have figured out that this was fixed in Android 6 in commit
6dafd87fb4%5E%21/#F0
which set default alignment to FILL if weight is nonzero
This commit is contained in:
Michał Bednarski
2016-08-08 10:16:47 +02:00
parent c9b49cef58
commit c350318c77

View File

@@ -165,8 +165,8 @@ public final class ExtraKeysView extends GridLayout {
param.rightMargin = param.topMargin = 0; param.rightMargin = param.topMargin = 0;
param.setGravity(Gravity.LEFT); param.setGravity(Gravity.LEFT);
float weight = "▲▼◀▶".contains(buttonText) ? 0.7f : 1.f; float weight = "▲▼◀▶".contains(buttonText) ? 0.7f : 1.f;
param.columnSpec = GridLayout.spec(col, weight); param.columnSpec = GridLayout.spec(col, GridLayout.FILL, weight);
param.rowSpec = GridLayout.spec(row, 1.f); param.rowSpec = GridLayout.spec(row, GridLayout.FILL, 1.f);
button.setLayoutParams(param); button.setLayoutParams(param);
addView(button); addView(button);