mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
revert class name (still can't override androidapplication), disable keyboardprovider
This commit is contained in:
@@ -31,9 +31,9 @@ import android.view.Window;
|
|||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import com.badlogic.gdx.*;
|
import com.badlogic.gdx.*;
|
||||||
import com.badlogic.gdx.backends.android.keyboardheight.AndroidRKeyboardHeightProvider;
|
/*import com.badlogic.gdx.backends.android.keyboardheight.AndroidRKeyboardHeightProvider;
|
||||||
import com.badlogic.gdx.backends.android.keyboardheight.KeyboardHeightProvider;
|
import com.badlogic.gdx.backends.android.keyboardheight.KeyboardHeightProvider;
|
||||||
import com.badlogic.gdx.backends.android.keyboardheight.StandardKeyboardHeightProvider;
|
import com.badlogic.gdx.backends.android.keyboardheight.StandardKeyboardHeightProvider;*/
|
||||||
import com.badlogic.gdx.backends.android.surfaceview.FillResolutionStrategy;
|
import com.badlogic.gdx.backends.android.surfaceview.FillResolutionStrategy;
|
||||||
import com.badlogic.gdx.utils.*;
|
import com.badlogic.gdx.utils.*;
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ import com.badlogic.gdx.utils.*;
|
|||||||
* configuration for the GLSurfaceView.
|
* configuration for the GLSurfaceView.
|
||||||
*
|
*
|
||||||
* @author mzechner */
|
* @author mzechner */
|
||||||
public class AndroidApplication extends Activity implements AndroidApplicationBase {
|
public class ForgeAndroidApplication extends Activity implements AndroidApplicationBase {
|
||||||
|
|
||||||
protected AndroidGraphics graphics;
|
protected AndroidGraphics graphics;
|
||||||
protected AndroidInput input;
|
protected AndroidInput input;
|
||||||
@@ -63,7 +63,7 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
|||||||
protected boolean useImmersiveMode = false;
|
protected boolean useImmersiveMode = false;
|
||||||
private int wasFocusChanged = -1;
|
private int wasFocusChanged = -1;
|
||||||
private boolean isWaitingForAudio = false;
|
private boolean isWaitingForAudio = false;
|
||||||
private KeyboardHeightProvider keyboardHeightProvider;
|
//private KeyboardHeightProvider keyboardHeightProvider;
|
||||||
|
|
||||||
protected boolean renderUnderCutout = false;
|
protected boolean renderUnderCutout = false;
|
||||||
|
|
||||||
@@ -181,11 +181,11 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
|||||||
|
|
||||||
setLayoutInDisplayCutoutMode(this.renderUnderCutout);
|
setLayoutInDisplayCutoutMode(this.renderUnderCutout);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||||
keyboardHeightProvider = new AndroidRKeyboardHeightProvider(this);
|
keyboardHeightProvider = new AndroidRKeyboardHeightProvider(this);
|
||||||
} else {
|
} else {
|
||||||
keyboardHeightProvider = new StandardKeyboardHeightProvider(this);
|
keyboardHeightProvider = new StandardKeyboardHeightProvider(this);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
protected FrameLayout.LayoutParams createLayoutParams () {
|
protected FrameLayout.LayoutParams createLayoutParams () {
|
||||||
@@ -260,7 +260,7 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
|||||||
graphics.onPauseGLSurfaceView();
|
graphics.onPauseGLSurfaceView();
|
||||||
|
|
||||||
super.onPause();
|
super.onPause();
|
||||||
keyboardHeightProvider.setKeyboardHeightObserver(null);
|
//keyboardHeightProvider.setKeyboardHeightObserver(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -289,19 +289,19 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
|||||||
this.isWaitingForAudio = false;
|
this.isWaitingForAudio = false;
|
||||||
}
|
}
|
||||||
super.onResume();
|
super.onResume();
|
||||||
keyboardHeightProvider.setKeyboardHeightObserver((DefaultAndroidInput)Gdx.input);
|
/*keyboardHeightProvider.setKeyboardHeightObserver((DefaultAndroidInput)Gdx.input);
|
||||||
((AndroidGraphics)getGraphics()).getView().post(new Runnable() {
|
((AndroidGraphics)getGraphics()).getView().post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run () {
|
public void run () {
|
||||||
keyboardHeightProvider.start();
|
keyboardHeightProvider.start();
|
||||||
}
|
}
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy () {
|
protected void onDestroy () {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
keyboardHeightProvider.close();
|
//keyboardHeightProvider.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -385,7 +385,7 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
|||||||
handler.post(new Runnable() {
|
handler.post(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run () {
|
public void run () {
|
||||||
AndroidApplication.this.finish();
|
ForgeAndroidApplication.this.finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -528,7 +528,7 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
|||||||
return new DefaultAndroidFiles(this.getAssets(), this, true);
|
return new DefaultAndroidFiles(this.getAssets(), this, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public KeyboardHeightProvider getKeyboardHeightProvider () {
|
/*public KeyboardHeightProvider getKeyboardHeightProvider () {
|
||||||
return keyboardHeightProvider;
|
return keyboardHeightProvider;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
@@ -51,7 +51,7 @@ import android.widget.TableRow;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Version;
|
import com.badlogic.gdx.Version;
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
import com.badlogic.gdx.backends.android.ForgeAndroidApplication;
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||||
import com.badlogic.gdx.backends.android.AndroidAudio;
|
import com.badlogic.gdx.backends.android.AndroidAudio;
|
||||||
import com.badlogic.gdx.backends.android.AsynchronousAndroidAudio;
|
import com.badlogic.gdx.backends.android.AsynchronousAndroidAudio;
|
||||||
@@ -73,7 +73,7 @@ import java.text.Normalizer;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class Main extends AndroidApplication {
|
public class Main extends ForgeAndroidApplication {
|
||||||
private AndroidAdapter Gadapter;
|
private AndroidAdapter Gadapter;
|
||||||
private ArrayList<String> gamepads;
|
private ArrayList<String> gamepads;
|
||||||
private AndroidClipboard androidClipboard;
|
private AndroidClipboard androidClipboard;
|
||||||
|
|||||||
Reference in New Issue
Block a user