diff options
author | Christian S <christian@pix-art.de> | 2015-11-29 18:27:22 +0100 |
---|---|---|
committer | Christian S <christian@pix-art.de> | 2015-11-29 18:27:22 +0100 |
commit | d8ec3153655ceb716349fdc3c7d7106b22fd8d8a (patch) | |
tree | 98c6a76b4fc02982f85942524aa94180da09c880 /src/main/java/eu/siacs/conversations/utils/UIHelper.java | |
parent | 2aebe6e56b4268dddfbd7f1cecf9dcab2de28026 (diff) | |
parent | aeba964a65fce4ac77c908533d25295d44e9d2b5 (diff) |
copy commits
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils/UIHelper.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/utils/UIHelper.java | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index 8a73d35fb..cac23f077 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -3,11 +3,7 @@ package eu.siacs.conversations.utils; import android.content.Context; import android.text.format.DateFormat; import android.text.format.DateUtils; -import android.util.DisplayMetrics; import android.util.Pair; -import android.view.View; -import android.widget.LinearLayout; -import android.widget.RelativeLayout; import java.util.ArrayList; import java.util.Arrays; @@ -265,21 +261,4 @@ public class UIHelper { body = body.replace("?","").replace("¿",""); return LOCATION_QUESTIONS.contains(body); } - - public static void resetChildMargins(LinearLayout view) { - int childCount = view.getChildCount(); - for (int i = 0; i < childCount; i++) { - UIHelper.resetMargins(view.getChildAt(i)); - } - } - - private static void resetMargins(View view) { - LinearLayout.MarginLayoutParams marginLayoutParams = new LinearLayout.MarginLayoutParams(view.getLayoutParams()); - marginLayoutParams.setMargins(view.getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin), - view.getResources().getDimensionPixelSize(R.dimen.activity_vertical_margin), - view.getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin), - view.getResources().getDimensionPixelSize(R.dimen.activity_vertical_margin)); - LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(marginLayoutParams); - view.setLayoutParams(layoutParams); - } } |