[TIMOB-26601] Android: Cannot apply theme with "windowTranslucentNavigation" or "windowTranslucentStatus" to splash screen as of 7.5.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-12-18T17:53:03.000+0000 |
Affected Version/s | Release 7.5.0 |
Fix Version/s | Release 8.0.0 |
Components | Android |
Labels | android, navigationbar, splash, statusbar, theme, translucent |
Reporter | Joshua Quick |
Assignee | Yordan Banev |
Created | 2018-11-28T04:06:29.000+0000 |
Updated | 2018-12-20T18:43:34.000+0000 |
Description
*Summary:*
As of Titanium 7.5.0, a custom theme set up with Add the below "my_themes.xml" file under folder:
windowTranslucentNavigation
or windowTranslucentStatus
will be undone when applied to the splash screen activity.
*Steps to reproduce:*
Create a Classic app named "SplashTest".
Set up a blank "app.js" as shown below.
Add the below "my_themes.xml" file under folder: ./platform/android/res/values
Set up "tiapp.xml" with the below.
Build and run on Android.
On app startup, notice that top status bar and bottom navigation bar are briefly displayed semi-transparent... but then become opaque. (The bug is they're not supposed to turn opaque.)
Notice that the following warning gets logged.
You cannot use a translucent status bar or navigation bar unless you set the window's 'extendSafeArea' property to true.
app.js
// Leave the "app.js" script blank.
./platform/android/res/values/my_themes.xml
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<style name="MyTheme" parent="@style/Theme.Titanium">
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>
tiapp.xml
<ti:app xmlns:ti="http://ti.appcelerator.org">
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application>
<activity android:name=".SplashtestActivity" android:theme="@style/MyTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
</android>
</ti:app>
PR: https://github.com/appcelerator/titanium_mobile/pull/10536
FR Passed. PR Merged.
Verified the fix with SDK 8.0.0.v20181219104517. Closing.