Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2545] UI.Window fullscreen and navBarHidden defaults change

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2011-04-26T09:12:20.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-11
ComponentsAndroid
Labelsandroid, defect, release-1.7.0, reported-1.5.1, rplist
Reporterbrent#1
AssigneeDon Thorp
Created2011-04-15T03:22:18.000+0000
Updated2011-04-26T09:12:20.000+0000

Description

On Android, the default values for the Titanium.UI.Window properties “fullscreen” and “navBarHidden” change based on how the other is defined or not defined. The obvious workaround is to explicitly set the values for them for all windows.

"defaults to" means "when not specified, renders window as if the value was explicitly set to"

  • If navBarHidden is true, fullscreen defaults to “false”.
  • If either fullscreen or navBarHidden is false and the other defaults to “false”.
  • If fullscreen is true, navBarHidden defaults to “false”.
  • If neither fullscreen or navBarHidden are defined both default to ‘true”

Have not tested this on iOS.

I've attached my app.js and RTF document containing screen clips. For each of the screen clips, the values of fullscreen and/or navBarHidden were changed or commented out and the app rebuilt and installed on the emulator.

Titanium SDK version: 1.5.0 (12/09/10 01:18 43358e5)
Android 2.2 APIs.

Attachments

FileDateSize
app.js2011-04-15T03:22:18.000+0000951
window_api_defaults.rtf2011-04-15T03:22:21.000+00005824413

Comments

  1. kevinwhinnery 2011-04-15

    There's not an associated helpdesk ticket, but this is coming from a premium seat.

  2. Bill Dawson 2011-04-15

    The issue here is related to our default theme and the difference between "lightweight" and "heavyweight" windows.

    First, regarding the default theme (which we see with the splash screen). Sometime between 1.4.2 and 1.5.0 our default theme changed to fullscreen because of this commit:

    https://github.com/appcelerator/titanium_mobile/commit/13242dc433427f07697a10237ca37792a5ae8379"> https://github.com/appcelerator/titanium_mobile/commit/13242dc43342...

    The commit does not reference a Lighthouse ticket, so I don't know why it was done.

    Now, regarding light v heavy:

    When opening a window from app.js, the window will inherit our default theme (which is now fullscreen, as evidenced above) unless you specify at least one of the following properties: fullscreen, navBarHidden, modal or windowSoftInputMode. If you specify any one (or more) of those properties when creating the window, the window gets its own Android Activity, which defaults to Android's default theme, which is not fullscreen. If you do not specify any one of those properties, the window is drawn on the existing Android Activity, which is the same activity that showed the splash screen, and which is therefore fullscreen.

    Examples:

    • You specify none of those four properties in createWindow(): you get fullscreen, because it's using the same activity as the splash screen, which is fullscreen.

    • Now specify navBarHidden (either true or false). The window will not be full screen anymore because it is no longer based on our splash screen theme, but rather based on the default Android theme, which is not fullscreen.

    Not sure if we want to go back to having a non-fullscreen splash theme?

  3. Bill Dawson 2011-04-15

    @DON agreed this is not a defect? Pulled the tiapp.xml defect (not respecting navbar-hidden, statusbar-hidden options) into Sprint 2011-12: #3024

  4. Don Thorp 2011-04-15

    Not a defect. See #3024 for the tiapp.xml problem.

JSON Source