mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:09:52 +02: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:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
|
||||||
android:name=".InterfaceActivity"
|
android:name=".InterfaceActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:screenOrientation="landscape"
|
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@ -79,6 +78,7 @@
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".SplashActivity"
|
android:name=".SplashActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Theme.AppCompat.Translucent.NoActionBar" />
|
android:theme="@style/Theme.AppCompat.Translucent.NoActionBar" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,9 @@ public class InterfaceActivity extends QtActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.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
|
// TODO Fix displayPlugin deactivate so it doesn't leave us with a black screen Interface
|
||||||
//nativeEnterForeground();
|
//nativeEnterForeground();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package io.highfidelity.hifiinterface;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
|
||||||
public class SplashActivity extends Activity {
|
public class SplashActivity extends Activity {
|
||||||
|
|
||||||
|
@ -26,7 +27,10 @@ public class SplashActivity extends Activity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onAppLoadedComplete() {
|
public void onAppLoadedComplete() {
|
||||||
startActivity(new Intent(this, HomeActivity.class));
|
// Give interface more time so textures don't fail(got deleted) on Adreno (joystick)
|
||||||
finish();
|
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_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimaryDark"
|
android:background="?attr/colorPrimaryDark"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
|
android:elevation="4dp"
|
||||||
|
/>
|
||||||
|
|
||||||
<include layout="@layout/content_home" />
|
<include layout="@layout/content_home" />
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
android:id="@+id/root_activity_splash"
|
android:id="@+id/root_activity_splash"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@android:color/transparent">
|
android:background="@color/backgroundLight">
|
||||||
|
|
||||||
<!-- TODO -->
|
<!-- TODO -->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue