The Fix
In the AndroidManifest.xml
<activity/>
element, changing the @android:theme
to a value of @android:style/Theme.Translucent
, fixed the issue for us:
Cordova generated AndroidManifest.xml
<manifest ...>
...
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:label="@string/activity_name"
android:launchMode="singleTop"
android:name="MainActivity"
android:theme="@android:style/Theme.Translucent"
android:windowSoftInputMode="adjustResize">
...
</activity>
...
</manifest>
The easiest way to automate this change so that you don't have to modify your Cordova-generated AndroidManifest.xml
file is to simply add an edit-config
element into your android <platform>
section of your Cordova config.xml
file (thanks to @simon-ludwig for this info):
Cordova config.xml platform section
<platform name="android">
<edit-config file="AndroidManifest.xml" target="/manifest/application/activity[@android:label='@string/activity_name']" mode="merge">
<activity android:theme="@android:style/Theme.Translucent"></activity>
</edit-config>
<!-- Other Android platform settings -->
</platform>
TLDR;
On some devices, there seems to be an incompatibility with the default Android theme generated by Cordova android. The value it specifies for the android:theme
attribute in the AndroidManifest.xml
is @android:style/Theme.DeviceDefault.NoActionBar
:
<manifest ...>
...
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:label="@string/activity_name"
android:launchMode="singleTop"
android:name="MainActivity"
android:theme="@android:style/Theme.DeviceDefault.NoActionBar"
android:windowSoftInputMode="adjustResize">
...
</activity>
...
</manifest>
There are a number of theme options as documented here at the Android developer website. What we've found to work for the TC-57, at least when running Android 8, is the value of android:theme="@android:style/Theme.Translucent"