Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18837] Android: Hiding ActionBar Broken with SDK 4.0.0.Beta2

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-08-25T22:15:20.000+0000
Affected Version/sRelease 4.0.0, Release 4.1.0
Fix Version/sRelease 4.0.0
ComponentsAndroid
Labelsregression
ReporterMichele Riso
AssigneeHieu Pham
Created2015-04-15T15:27:36.000+0000
Updated2017-03-22T00:09:09.000+0000

Description

Steps to Reproduce

Create an Android Application and use method 2 of this guide http://www.appcelerator.com/blog/2014/08/hiding-the-android-actionbar/. If you compile with SDK 3.5.1.GA all works fine, if you compile with SDK 4.0.0.Beta2 ActionBar is still present I'm attaching two screenshots of the same app compiled with both version. In the screenshots you can see Android Action Bar in BLACK and the RED one is a widget. This is the Custome Theme used:
<?xml version='1.0' encoding='utf-8'?>
<resources>
    <style name='Theme.NoActionBar' parent='@style/Theme.AppCompat'>
        <item name='android:windowActionBar'>false</item>
        <item name='android:windowNoTitle'>true</item>
    </style>
</resources> 
This is the Android Manifest (used by TiApp.xml)
<android xmlns:android='http://schemas.android.com/apk/res/android'>
        <manifest android:installLocation='auto' android:versionCode='1' android:versionName='1.0.0'>
            <supports-screens android:anyDensity='true'
                android:largeScreens='true' android:normalScreens='true'
                android:smallScreens='false' android:xlargeScreens='true'/>
            <uses-sdk android:minSdkVersion='14' android:targetSdkVersion='21'/>
            <application android:hardwareAccelerated='true'
                android:largeHeap='true' android:theme='@style/Theme.NoActionBar'>
                <activity
                    android:configChanges='keyboardHidden|orientation'
                    android:name='org.appcelerator.titanium.TiActivity'
                    android:screenOrientation='portrait' android:windowSoftInputMode='stateHidden'/>
                <activity
                    android:configChanges='keyboardHidden|orientation'
                    android:name='org.appcelerator.titanium.TiModalActivity'
                    android:screenOrientation='portrait' android:windowSoftInputMode='stateHidden'/>
                <activity
                    android:configChanges='keyboardHidden|orientation'
                    android:name='org.appcelerator.titanium.TiTranslucentActivity'
                    android:screenOrientation='portrait' android:windowSoftInputMode='stateHidden'/>
            </application>
        </manifest>
    </android>

Actual Result

ActionBar is still present

Expected Result

Hide ActionBar

Attachments

FileDateSize
ACTION BAR SDK 4.0.0.Beta2.png2015-04-15T15:28:47.000+0000164112
diagnostic8075568263503564183.log2015-04-15T15:28:42.000+000039931
NO ACTION BAR SDK 3.5.1.GA.png2015-04-15T15:28:44.000+0000157194
Screen Shot 2015-04-24 at 11.37.46 AM.png2015-04-24T07:09:09.000+000048919
Screen Shot 2015-04-24 at 11.40.01 AM.png2015-04-24T07:09:09.000+000046888
Screen Shot 2015-04-24 at 12.42.12 PM.png2015-04-24T07:09:09.000+000047280
Screen Shot 2015-04-24 at 12.47.00 PM.png2015-04-24T07:09:09.000+000046637

Comments

  1. Ingo Muschenetz 2015-04-24

    Hieu, can you please take a look?
  2. Manojkumar Murugesan 2015-04-25

    Hi Michele, I was not able to reproduce the issue with 4.0.0.RC version, can you please check once again on your end. I had also tried with actionbar hide method. Just works fine here. Screen shot for your reference - http://cl.ly/amGX?_ga=1.121574721.815005782.1429988273 Sorry, Was not able to find the attachment option here :)
       <?xml version="1.0" encoding="utf-8"?>
       <resources>
       	<style name="Theme.AppCompat.Material" parent="@style/Theme.AppCompat">
       		<item name="colorPrimary">#1565C0</item>
       		<item name="colorPrimaryDark">#0D47A1</item>
       		<item name="colorAccent">#FF80AB</item>
       		<item name="colorControlNormal">#757575</item>
       		<item name="colorControlActivated">#FF6E40</item>
       		<item name="colorControlHighlight">#FF4081</item>
       		<item name="colorSwitchThumbNormal">#BDBDBD</item>
       		<item name="android:colorButtonNormal">#BDBDBD</item>
       		<item name="android:colorEdgeEffect">#FF4081</item>
       	</style>
       	<style name="Theme.NoActionBar" parent="@style/Theme.AppCompat.Material">
       		<item name="windowActionBar">false</item>
       		<item name="android:windowNoTitle">true</item>
       	</style>
       </resources>
       
       <android xmlns:android="http://schemas.android.com/apk/res/android">
               <manifest>
                   <application android:theme="@style/Theme.NoActionBar"/>
               </manifest>
       </android>
       
  3. Michele Riso 2015-04-27

    Hi. I just tried using 4.0.0 RC but the action bar is still there :(
  4. Hieu Pham 2015-04-27

    Michele, could you zip and attach your sample project to this ticket? I tested it with 4.0.0.RC and it works fine for me (The title bar was hidden correctly). Thanks.
  5. Michele Riso 2015-04-28

    Hi. I created a new Project. You can download it from this link [link TEST PROJECT 2](http://www.filedropper.com/testproject2) Please change GUID, APP ID on TIAPP.XML before compile it I tested with 3.5.1.GA and 4.0.0.RC Just a question: how to attach a file to a comment? :)
  6. Hieu Pham 2015-04-28

    Hi Michele, in 4.0.0 we update appcompat to version 21. It looks like "android:windowActionBar" keyword isn't working with the latest appCompat library. Please use "windowActionBar" instead. This is the theme your project has:
       <?xml version="1.0" encoding="utf-8"?>
       <resources>
           <style name="Theme.NoActionBar" parent="@style/Theme.AppCompat">
               <item name="android:windowActionBar">false</item>
               <item name="android:windowNoTitle">true</item>
           </style>
       </resources> 
       
    This is what you need:
       <?xml version="1.0" encoding="utf-8"?>
       <resources>
           <style name="Theme.NoActionBar" parent="@style/Theme.AppCompat">
               <item name="windowActionBar">false</item>
               <item name="android:windowNoTitle">true</item>
           </style>
       </resources> 
       
    FYI, to attach a file, go to More -> Attach File
  7. Ingo Muschenetz 2015-04-29

    This appears to be an issue with project configuration. If after following the suggestions it's still an issue, please reopen.
  8. Eric Merriman 2015-04-29

    Closing as addressed. Please reopen if this issue is still a problem.
  9. Lee Morris 2017-03-22

    Closing ticket as fixed.

JSON Source