Android: Replaced deprecated AbsoluteLayout with RelativeLayout.
authorPhilipp Wiesemann
Wed, 27 Jul 2016 20:46:18 +0200
changeset 102101b5a21b3fa97
parent 10209 afd286e26823
child 10211 2e4c1b2fce79
Android: Replaced deprecated AbsoluteLayout with RelativeLayout.

Fixes Bugzilla #2211.
android-project/src/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Wed Jul 20 21:01:14 2016 +0200
     1.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Wed Jul 27 20:46:18 2016 +0200
     1.3 @@ -17,7 +17,7 @@
     1.4  import android.view.inputmethod.EditorInfo;
     1.5  import android.view.inputmethod.InputConnection;
     1.6  import android.view.inputmethod.InputMethodManager;
     1.7 -import android.widget.AbsoluteLayout;
     1.8 +import android.widget.RelativeLayout;
     1.9  import android.widget.Button;
    1.10  import android.widget.LinearLayout;
    1.11  import android.widget.TextView;
    1.12 @@ -171,7 +171,7 @@
    1.13              mJoystickHandler = new SDLJoystickHandler();
    1.14          }
    1.15  
    1.16 -        mLayout = new AbsoluteLayout(this);
    1.17 +        mLayout = new RelativeLayout(this);
    1.18          mLayout.addView(mSurface);
    1.19  
    1.20          setContentView(mLayout);
    1.21 @@ -504,8 +504,9 @@
    1.22  
    1.23          @Override
    1.24          public void run() {
    1.25 -            AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(
    1.26 -                    w, h + HEIGHT_PADDING, x, y);
    1.27 +            RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(w, h + HEIGHT_PADDING);
    1.28 +            params.leftMargin = x;
    1.29 +            params.topMargin = y;
    1.30  
    1.31              if (mTextEdit == null) {
    1.32                  mTextEdit = new DummyEdit(getContext());