Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26601] Android: Cannot apply theme with "windowTranslucentNavigation" or "windowTranslucentStatus" to splash screen as of 7.5.0

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-12-18T17:53:03.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 8.0.0
ComponentsAndroid
Labelsandroid, navigationbar, splash, statusbar, theme, translucent
ReporterJoshua Quick
AssigneeYordan Banev
Created2018-11-28T04:06:29.000+0000
Updated2018-12-20T18:43:34.000+0000

Description

*Summary:* As of Titanium 7.5.0, a custom theme set up with 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>

Comments

  1. Yordan Banev 2018-12-13

    PR: https://github.com/appcelerator/titanium_mobile/pull/10536
  2. Lokesh Choudhary 2018-12-18

    FR Passed. PR Merged.
  3. Lokesh Choudhary 2018-12-20

    Verified the fix with SDK 8.0.0.v20181219104517. Closing.

JSON Source