mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +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.widget.FrameLayout;
|
||||
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.StandardKeyboardHeightProvider;
|
||||
import com.badlogic.gdx.backends.android.keyboardheight.StandardKeyboardHeightProvider;*/
|
||||
import com.badlogic.gdx.backends.android.surfaceview.FillResolutionStrategy;
|
||||
import com.badlogic.gdx.utils.*;
|
||||
|
||||
@@ -42,7 +42,7 @@ import com.badlogic.gdx.utils.*;
|
||||
* configuration for the GLSurfaceView.
|
||||
*
|
||||
* @author mzechner */
|
||||
public class AndroidApplication extends Activity implements AndroidApplicationBase {
|
||||
public class ForgeAndroidApplication extends Activity implements AndroidApplicationBase {
|
||||
|
||||
protected AndroidGraphics graphics;
|
||||
protected AndroidInput input;
|
||||
@@ -63,7 +63,7 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
||||
protected boolean useImmersiveMode = false;
|
||||
private int wasFocusChanged = -1;
|
||||
private boolean isWaitingForAudio = false;
|
||||
private KeyboardHeightProvider keyboardHeightProvider;
|
||||
//private KeyboardHeightProvider keyboardHeightProvider;
|
||||
|
||||
protected boolean renderUnderCutout = false;
|
||||
|
||||
@@ -181,11 +181,11 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
||||
|
||||
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);
|
||||
} else {
|
||||
keyboardHeightProvider = new StandardKeyboardHeightProvider(this);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
protected FrameLayout.LayoutParams createLayoutParams () {
|
||||
@@ -260,7 +260,7 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
||||
graphics.onPauseGLSurfaceView();
|
||||
|
||||
super.onPause();
|
||||
keyboardHeightProvider.setKeyboardHeightObserver(null);
|
||||
//keyboardHeightProvider.setKeyboardHeightObserver(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -289,19 +289,19 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
||||
this.isWaitingForAudio = false;
|
||||
}
|
||||
super.onResume();
|
||||
keyboardHeightProvider.setKeyboardHeightObserver((DefaultAndroidInput)Gdx.input);
|
||||
/*keyboardHeightProvider.setKeyboardHeightObserver((DefaultAndroidInput)Gdx.input);
|
||||
((AndroidGraphics)getGraphics()).getView().post(new Runnable() {
|
||||
@Override
|
||||
public void run () {
|
||||
keyboardHeightProvider.start();
|
||||
}
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy () {
|
||||
super.onDestroy();
|
||||
keyboardHeightProvider.close();
|
||||
//keyboardHeightProvider.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -385,7 +385,7 @@ public class AndroidApplication extends Activity implements AndroidApplicationBa
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
public KeyboardHeightProvider getKeyboardHeightProvider () {
|
||||
/*public KeyboardHeightProvider getKeyboardHeightProvider () {
|
||||
return keyboardHeightProvider;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
@@ -51,7 +51,7 @@ import android.widget.TableRow;
|
||||
import android.widget.TextView;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
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.AndroidAudio;
|
||||
import com.badlogic.gdx.backends.android.AsynchronousAndroidAudio;
|
||||
@@ -73,7 +73,7 @@ import java.text.Normalizer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
public class Main extends AndroidApplication {
|
||||
public class Main extends ForgeAndroidApplication {
|
||||
private AndroidAdapter Gadapter;
|
||||
private ArrayList<String> gamepads;
|
||||
private AndroidClipboard androidClipboard;
|
||||
|
||||
Reference in New Issue
Block a user