Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5414] Android: can't display drawer menu over ActionBar correctly (title color gets overwritten)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDone
Resolution Date2017-12-27T22:11:51.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsactionbar, android, drawerlayout
ReporterGuillermo Figueras
AssigneeShak Hossain
Created2017-11-29T12:15:30.000+0000
Updated2017-12-27T22:11:51.000+0000

Description

I'm facing a problem with drawer menus in Android. I want my app to display the drawer menu over the ActionBar. I managed to do that by setting a couple of properties on my app theme, but the problem is that after using those two properties, my ActionBar title color will change to black, and I want it to be white. *mytheme.xml:*
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
	<item name="colorPrimary">@color/red</item>
	<item name="android:colorPrimaryDark">@color/red_dark</item>
	<item name="android:textColorPrimary">@color/white</item>  
	<item name="android:textColorSecondary">@color/white</item>
    	<item name="android:textColorHint">#CCCCCC</item>
    	<item name="colorControlHighlight">#212121</item>

    	<!-- With these properties I can display drawer menu over actionbar but actionbar's title color changes to black  -->
    	<item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
</style>
I uploaded some images so you can see what's happening to me. If I don't set windowActionBar and windowNoTitle on my theme you can check how my app will look like by opening the image _drawer_below_actionbar.png_ If I do set those two properties on my theme, then the drawer will cover the ActionBar but its title will get black instead of white. Check images _drawer_over_actionbar.png_ and _actionbar_wrong_color.png_

Attachments

FileDateSize
actionbar_wrong_color.png2017-11-29T12:11:46.000+000013731
drawer_below_actionbar.png2017-11-29T12:11:47.000+000038065
drawer_over_actionbar.png2017-11-29T12:11:47.000+000032409

Comments

  1. Yordan Banev 2017-11-29

    [~gfigueras] These two properties disable the default ActionBar, so I assume you are using an instance of Toolbar as one? If that is the case - titleTextColor can be used: https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Toolbar-property-titleTextColor If that is not the case and you are able to provide how are you setting up your ActionBar it would be really helpful.
  2. Sharif AbuDarda 2017-12-03

  3. Sharif AbuDarda 2017-12-27

    The issue is resolved in SDK 7.0.1.GA.

JSON Source