mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-17 14:47:19 +01:00
Android: Replaced deprecated AbsoluteLayout with RelativeLayout.
Fixes Bugzilla #2211.
This commit is contained in:
parent
4743b55c7a
commit
242c3480bf
@ -17,7 +17,7 @@ import android.view.inputmethod.BaseInputConnection;
|
|||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.view.inputmethod.InputConnection;
|
import android.view.inputmethod.InputConnection;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.AbsoluteLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -171,7 +171,7 @@ public class SDLActivity extends Activity {
|
|||||||
mJoystickHandler = new SDLJoystickHandler();
|
mJoystickHandler = new SDLJoystickHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
mLayout = new AbsoluteLayout(this);
|
mLayout = new RelativeLayout(this);
|
||||||
mLayout.addView(mSurface);
|
mLayout.addView(mSurface);
|
||||||
|
|
||||||
setContentView(mLayout);
|
setContentView(mLayout);
|
||||||
@ -504,8 +504,9 @@ public class SDLActivity extends Activity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(
|
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(w, h + HEIGHT_PADDING);
|
||||||
w, h + HEIGHT_PADDING, x, y);
|
params.leftMargin = x;
|
||||||
|
params.topMargin = y;
|
||||||
|
|
||||||
if (mTextEdit == null) {
|
if (mTextEdit == null) {
|
||||||
mTextEdit = new DummyEdit(getContext());
|
mTextEdit = new DummyEdit(getContext());
|
||||||
|
Loading…
Reference in New Issue
Block a user