mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Android - Workaround for Joystick disappearing problem in Adreno devices + No excessive rotation in loading moment
This commit is contained in:
parent
52ef935acb
commit
751f8f59d7
5 changed files with 13 additions and 5 deletions
|
@ -54,7 +54,6 @@
|
|||
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
|
||||
android:name=".InterfaceActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="landscape"
|
||||
android:launchMode="singleTop"
|
||||
>
|
||||
|
||||
|
@ -79,6 +78,7 @@
|
|||
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.AppCompat.Translucent.NoActionBar" />
|
||||
</application>
|
||||
|
||||
|
|
|
@ -127,6 +127,9 @@ public class InterfaceActivity extends QtActivity {
|
|||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
if (!isLoading) {
|
||||
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
|
||||
}
|
||||
// TODO Fix displayPlugin deactivate so it doesn't leave us with a black screen Interface
|
||||
//nativeEnterForeground();
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.highfidelity.hifiinterface;
|
|||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
public class SplashActivity extends Activity {
|
||||
|
||||
|
@ -26,7 +27,10 @@ public class SplashActivity extends Activity {
|
|||
}
|
||||
|
||||
public void onAppLoadedComplete() {
|
||||
startActivity(new Intent(this, HomeActivity.class));
|
||||
finish();
|
||||
// Give interface more time so textures don't fail(got deleted) on Adreno (joystick)
|
||||
new Handler(getMainLooper()).postDelayed(() -> {
|
||||
startActivity(new Intent(this, HomeActivity.class));
|
||||
new Handler(getMainLooper()).postDelayed(() -> SplashActivity.this.finish(), 1000);
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimaryDark"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
android:elevation="4dp"
|
||||
/>
|
||||
|
||||
<include layout="@layout/content_home" />
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
android:id="@+id/root_activity_splash"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent">
|
||||
android:background="@color/backgroundLight">
|
||||
|
||||
<!-- TODO -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue