Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17571] Hiding the ActionBar using a custom theme misforms app when also using a 9-patch splash screen

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2014-09-15T19:36:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsactionbar, nine-patch, splash-screen
ReporterFokke Zandbergen
AssigneePing Wang
Created2014-08-28T20:11:46.000+0000
Updated2017-03-20T22:23:50.000+0000

Description

If you follow the guide to hide the ActionBar using a custom theme and at the same time also follow the guide to use 9-patch splash screens the application window will be small and sitting in the top left of the screen, uncovering the splash screen under it, as shown in the attached screenshot.

The guides

Just before the 3 steps for custom themes, the introduction of the following splash-guide says you do *not* need a custom theme if you just name your 9-patch splash screen images background.9.png: - http://docs.appcelerator.com/titanium/latest/#!/guide/Icons_and_Splash_Screens-section-29004897_IconsandSplashScreens-Androidsplashscreenconsiderations The following actionbar-guide shows how to use a custom_theme.xml together with a small change in tiapp.xml to hide the action bar on all windows: - http://docs.appcelerator.com/titanium/latest/#!/guide/Android_Action_Bar-section-36735509_AndroidActionBar-HidingtheActionBar

The problem

Both of these guides at themselves work just fine. But when you follow both of them you'll get the problem described.

Steps to reproduce

1. Download the attached example project 2. Build to see the expected white application window 3. Rename platform/android/res/_drawable to drawable 4. Build to see the white application window in the top left

Explored solutions

I've tried several changes such as using android:windowActionBar instead of windowActionBar or setting the splash in a custom theme, but nothing helped. I also compared the builds after step 2 and 4 of the steps laid out to reproduce. All the (non-binary) files were 100% identical, so the error must be in the compiled JAVA and not in the generated XML themes.

Workaround

I can't think of a (satisfying) workaround, so I hope this can be fixed soon.

Attachments

FileDateSize
Screen Shot 2014-08-28 at 22.15.10.png2014-08-28T20:15:45.000+0000166859
splashbar.zip2014-08-28T20:11:46.000+000071891

Comments

  1. Fokke Zandbergen 2014-08-28

    The app window (white) showing on top left of screen, uncovering the nine-patch splash.
  2. Fokke Zandbergen 2014-09-15

    Can I please get some love on this one [~ingo]? Without this resolved I'm stuck at 3.2.3.GA for apps what want no actionbar and use 9-patch slash screens.
  3. Fokke Zandbergen 2014-09-15

    Still an issue in 3.4.0.RC
  4. Ping Wang 2014-09-15

  5. Fokke Zandbergen 2014-09-16

    I can't access TIMOB-17563, but am I right that the docs have been updated? The attached test case had other code copied from the docs:
       <?xml version="1.0" encoding="utf-8"?>
       <resources>
           <style name="Theme.NoActionBar" parent="@style/Theme.Titanium">
               <!-- Depending on the parent theme, this may be called android:windowActionBar instead of windowActionBar -->
               <item name="windowActionBar">false</item>
           </style>
       </resources> 
       
    Changing it to your example (or the slightly different - android:windowActionBar - in the docs) fixed it. Thx!
  6. Manuel Lehner 2014-09-17

    Permission Violation when trying to access TIMOB-17563
  7. Ingo Muschenetz 2014-09-17

    Fixed.
  8. Lee Morris 2017-03-20

    Closing ticket as duplicate.

JSON Source