Connect successfully using this code:
Tutorial for adding Google Play services to LibGDX
However, now I see the android title bar visible. I tried to nail what exactly makes the title bar show (and I use verbatim code from the tutorial).
I think it has a MainActivity constructor in the mix, one way or another, it bypasses the LibGDX calls that noTitle requests.
So, I tried to add the NoTitleBar theme function to my manifest, and it works, but somehow, I now have orientation changes (which is not what the manifest says)
Can anyone see what I need to do in my Main or Android project so that
1) there is no title bar 2) do not allow orientation changes 3) connect to Google Play services.
Here is the manifest:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="pgs.libgdx.liars.dice" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" /> <activity android:name=".MainActivity" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > android:screenOrientation="landscape" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
Here is the relevant code from Android Project:
public class MainActivity extends AndroidApplication implements GameHelperListener, GoogleInterface { private GameHelper aHelper; private OnLeaderboardScoresLoadedListener theLeaderboardListener; public MainActivity(){ aHelper = new GameHelper(this); aHelper.enableDebugLog(true, "MYTAG");
and the main relevant code:
public LiarsDiceGame(){ } public LiarsDiceGame(GoogleInterface anInterface ) { platformInterface = anInterface;
Everything else is exactly the same as when setting up a LibGDX project using gdx-setup-ui.jar