From b85d7d165801c25f1bc838c5add68284b6a355f9 Mon Sep 17 00:00:00 2001 From: serso Date: Sat, 9 Apr 2016 21:42:28 +0200 Subject: [PATCH] Use LinearLayout parameters --- .../calculator/functions/FunctionParamsView.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/org/solovyev/android/calculator/functions/FunctionParamsView.java b/app/src/main/java/org/solovyev/android/calculator/functions/FunctionParamsView.java index e44dda93..845ebb2c 100644 --- a/app/src/main/java/org/solovyev/android/calculator/functions/FunctionParamsView.java +++ b/app/src/main/java/org/solovyev/android/calculator/functions/FunctionParamsView.java @@ -36,24 +36,18 @@ import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.EditorInfo; -import android.widget.EditText; -import android.widget.ImageButton; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.TextView; - +import android.widget.*; import org.solovyev.android.Check; import org.solovyev.android.calculator.App; import org.solovyev.android.calculator.Preferences; import org.solovyev.android.calculator.R; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import static android.view.ViewGroup.LayoutParams.MATCH_PARENT; import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; @@ -115,7 +109,7 @@ public class FunctionParamsView extends LinearLayout { }); headerView.addView(addButton, makeButtonParams()); headerView.addView(new View(context), new LayoutParams(3 * clickableAreaSize, WRAP_CONTENT)); - addView(headerView, new ViewGroup.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); + addView(headerView, new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); } @Nullable @@ -206,7 +200,7 @@ public class FunctionParamsView extends LinearLayout { rowView.addView(paramLabel, new LayoutParams(0, WRAP_CONTENT, 1)); // for row is added at 0 position, the consequent rows - addView(rowView, Math.max(0, getChildCount() - 1), new ViewGroup.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); + addView(rowView, Math.max(0, getChildCount() - 1), new LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)); onParamsChanged(); return rowView; }