Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1097] Android: Titlebar is displayed when fullscreen splash screen is used.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-05-16T19:38:05.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.1.0
ComponentsAndroid
Labelsapi
ReporterKevin Whinnery
AssigneeNeeraj Gupta
Created2011-04-15T02:43:59.000+0000
Updated2012-06-27T15:29:37.000+0000

Description

There are a couple of possibly related problems with trying to run a fullscreen application in Android. The first is with the splash screen. There should be a way to have the splash screen display on the whole screen, but this is not the case despite the tiapp.xml configuration in this screenshot which shows both the emulator and the code:

http://skitch.com/kwhinnery/dgmps/fullscreen">http://skitch.com/kwhinnery/dgmps/fullscreen

Also, once the app launches, you should be able to open a window fullscreen with no title - this would be necessary for an app to go totally fullscreen:

http://skitch.com/kwhinnery/dgmp7/fullscreen">http://skitch.com/kwhinnery/dgmp7/fullscreen

Test Code

 in theme.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.Titanium" parent="android:Theme.NoTitleBar.Fullscreen"> <item name="android:windowBackground">@drawable/background</item> </style> </resources>

Expected behavior

The splash screen should be displayed full screen with no title bar

Actual behavior

The title bar, is displayed. During build the theme.xml gets reset, causing the title bar to be displayed.

Work-around

There is a workaround posted in community Q and A. out one way to resolve this problem. 1) Create folders \platform\android\res\values (see KitchenSink folder structure) 2) Put in folder "values" the file theme.xml modifyed (i.e. )

Comments

  1. Don Thorp 2011-04-15

    To get the effect the res/values/theme.xml file is going to have to be updated to use a different base Theme based on the settings in tiapp.xml

    For just no title (navBarHidden : true) Theme.NoTitle instead of just Theme

    For truly fullscreen (navBarHidden : true, fullscreen : true) use Theme.NoTitle.Fullscreen

  2. Jeff 2011-04-15

    Thank you Don, this post was a lifesaver. In order to get this work in Titanium SDK 1.3.x, make the following changes:

    -In theme.xml (res/values/theme.xml) file, change the the file to read the following:

       
       
       
       
       <item name="android:windowBackground">@drawable/background</item>
       <item name="android:windowNoTitle">true</item>
       
       
       
       

    -Now, in your window declaration, make sure both fullscreen: true and navBarHidden: true are set (or only the splash screen will appear fullscreen without a title). MAKE SURE THAT THE 'TITLE' value isn't set at all, not even to blank.

    I look forward to the fix in 1.4!

    -

  3. Jeff 2011-04-15

    Sorry! Let me fix my post a bit (should have RTFM on formatting :)

    In order to fix this in 1.3.x, do the following:

    -In theme.xml (res/values/theme.xml) file, change the style element to the file to read the following:

       <style name="Theme.Titanium" parent="@android:Theme.NoTitleBar.Fullscreen">
           <item name="android:windowBackground">@drawable/background</item>
           <item name="android:windowNoTitle">true</item>`
       </style>
       

    -Now, in your window declaration, make sure both fullscreen: true and navBarHidden: true are set (or only the splash screen will appear fullscreen without a title). MAKE SURE THAT THE 'TITLE' value isn't set at all, not even to blank. Like so:

       var win1 = Titanium.UI.createWindow({
           backgroundColor:"#eb367a",
           fullscreen: true,
           navBarHidden: true,
           top:0
       });
       

    I look forward to the fix in 1.4!

  4. Nikolai Derzhak 2011-04-15

    rollback wrong update
  5. Devang Gandhi 2012-02-02

    Requesting a schedule for this fix in the next patch for a customer - MobiManage. Even though there is a work-around, customer is requesting a full fix for this.
  6. Federico Casali 2012-05-16

    Setting true with latest 2.1 CI build I can't reproduce the issue. Closing.
  7. Olga Romero 2012-06-27

    Verified fix with Titanium Studio, build: 2.1.0.201206251749 Titanium SDK: 2.1.0.v20120626204252 LG VS910 4G Android version 2.3.6

JSON Source