Padding on checkboxes is broken on Android < 4.2.

This commit is contained in:
akwizgran
2014-03-10 18:47:08 +00:00
parent 4de97ed0ef
commit cd4fb6fb64
3 changed files with 14 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
package org.briarproject.android.util;
import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
@@ -9,7 +9,10 @@ public class FixedVerticalSpace extends View {
public FixedVerticalSpace(Context ctx) {
super(ctx);
int height = LayoutUtils.getPadding(ctx);
setLayoutParams(new LayoutParams(MATCH_PARENT, height));
setHeight(LayoutUtils.getPadding(ctx));
}
public void setHeight(int height) {
setLayoutParams(new LayoutParams(WRAP_CONTENT, height));
}
}