Skip to content

Commit

Permalink
Android: Replaced deprecated AbsoluteLayout with RelativeLayout.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #2211.
  • Loading branch information
philippwiesemann committed Jul 27, 2016
1 parent 4743b55 commit 242c348
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -17,7 +17,7 @@
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;
Expand Down Expand Up @@ -171,7 +171,7 @@ public void onClick(DialogInterface dialog,int id) {
mJoystickHandler = new SDLJoystickHandler();
}

mLayout = new AbsoluteLayout(this);
mLayout = new RelativeLayout(this);
mLayout.addView(mSurface);

setContentView(mLayout);
Expand Down Expand Up @@ -504,8 +504,9 @@ public ShowTextInputTask(int x, int y, int w, int h) {

@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());
Expand Down

0 comments on commit 242c348

Please sign in to comment.