From 242c3480bf2adfc6f35af05eeb9c066df26f35b1 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 27 Jul 2016 20:46:18 +0200 Subject: [PATCH] Android: Replaced deprecated AbsoluteLayout with RelativeLayout. Fixes Bugzilla #2211. --- android-project/src/org/libsdl/app/SDLActivity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/android-project/src/org/libsdl/app/SDLActivity.java b/android-project/src/org/libsdl/app/SDLActivity.java index bc81b03e0..6245fdb42 100644 --- a/android-project/src/org/libsdl/app/SDLActivity.java +++ b/android-project/src/org/libsdl/app/SDLActivity.java @@ -17,7 +17,7 @@ import android.view.inputmethod.BaseInputConnection; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; -import android.widget.AbsoluteLayout; +import android.widget.RelativeLayout; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; @@ -171,7 +171,7 @@ public class SDLActivity extends Activity { mJoystickHandler = new SDLJoystickHandler(); } - mLayout = new AbsoluteLayout(this); + mLayout = new RelativeLayout(this); mLayout.addView(mSurface); setContentView(mLayout); @@ -504,8 +504,9 @@ public class SDLActivity extends Activity { @Override public void run() { - AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams( - w, h + HEIGHT_PADDING, x, y); + RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(w, h + HEIGHT_PADDING); + params.leftMargin = x; + params.topMargin = y; if (mTextEdit == null) { mTextEdit = new DummyEdit(getContext());