Skip to main content
removeu 210 caracteres do conteúdo
Fonte Link
Bruno
  • 1
  • 1
  • 5

Como posso alterar a cor do título da ActionBar e a corEste é meu novo layout, porém os items do overflow paraficaram em branco? Esse é com fundo branco, e preciso de fundo branco com letras em preto. Lembrando que utilizei o meu stylestylegenerator.xml

<!--
    Base application theme for API 14+. This theme completely replaces
    AppBaseTheme from BOTH res/values/styles.xml and
    res/values-v11/styles.xml on API 14+ devices.

-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <!-- API 14 theme customizations can go here. -->
</style>

<style name="Theme.Datalayer" parent="@android:style/Theme.Holo.Light">Light.DarkActionBar">
    <item name="android:actionBarItemBackground">@drawable/selectable_background_datalayer</item>
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
    <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Datalayer</item>
    <item name="android:actionDropDownStyle">@style/DropDownNav.Datalayer</item>
    <item name="android:actionBarStyle">@style/ActionBar.Solid.Datalayer</item>
    <item name="android:actionModeBackground">@drawable/cab_background_top_datalayer</item>
    <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_datalayer</item>
    <item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Datalayer</item>
   <item name="android:actionMenuTextColor">@color/black</item>
    <!-- Light.DarkActionBar specific -->
    <item name="android:titleTextStyle">@styleactionBarWidgetTheme">@style/MyThemeTheme.ActionBarDatalayer.TitleTextStyle<Widget</item>
</style>

<style name="ActionBar.Solid.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar.Solid">Solid.Inverse">
    <item name="android:background">@drawable/ab_solid_datalayer</item>
    <item name="android:backgroundStacked">@drawable/ab_stacked_solid_datalayer</item>
    <item name="android:backgroundSplit">@drawable/ab_bottom_solid_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="ActionBar.Transparent.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">@drawable/ab_transparent_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="MyTheme.ActionBarname="PopupMenu.TitleTextStyle"Datalayer" parent="@android:style/TextAppearance.Holo.Widget.ActionBarHolo.Title">
    <item name="android:textColor">@color/action_bar_text</item>
    <item name="android:actionMenuTextColor">@color/action_bar_text</item>ListPopupWindow">
    <item name="android:titleTextStyle">@colorpopupBackground">@drawable/action_bar_text<menu_dropdown_panel_datalayer</item>
</style>

<style name="PopupMenu.Datalayer" parent="@android:style/Widget.Holo.Light.ListPopupWindow">
    <item name="android:popupBackground">@drawabletextColor">@color/menu_dropdown_panel_datalayer<black</item>
</style>

<style name="DropDownListView.Datalayer" parent="@android:style/Widget.Holo.Light.ListView.DropDown">
    <item name="android:listSelector">@drawable/selectable_background_datalayer</item>
</style>

<style name="ActionBarTabStyle.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar.TabView">
    <item name="android:background">@drawable/tab_indicator_ab_datalayer</item>
</style>

<style name="DropDownNav.Datalayer" parent="@android:style/Widget.Holo.Light.Spinner">
    <item name="android:background">@drawable/spinner_background_ab_datalayer</item>
    <item name="android:popupBackground">@drawable/menu_dropdown_panel_datalayer</item>
    <item name="android:dropDownSelector">@drawable/selectable_background_datalayer</item>
    <item name="android:spinnerDropDownItemStyle">@style/mySpinnerItemStyle</item>
</style>

<style name="mySpinnerItemStyle" parent="@android:style/Widget.Holo.DropDownItem.Spinner">
    <item name="android:textColor">@color/black</item>
</style>

<style name="ProgressBar.Datalayer" parent="@android:style/Widget.Holo.Light.ProgressBar.Horizontal">
    <item name="android:progressDrawable">@drawable/progress_horizontal_datalayer</item>
</style>

<style name="ActionButton.CloseMode.Datalayer" parent="@android:style/Widget.Holo.Light.ActionButton.CloseMode">
    <item name="android:background">@drawable/btn_cab_done_datalayer</item>
</style> 

<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Datalayer.Widget" parent="@android:style/Theme.Holo">
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
</style>

Como posso alterar a cor do título da ActionBar e a cor do overflow para branco? Esse é o meu style.xml

<!--
    Base application theme for API 14+. This theme completely replaces
    AppBaseTheme from BOTH res/values/styles.xml and
    res/values-v11/styles.xml on API 14+ devices.

-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <!-- API 14 theme customizations can go here. -->
</style>

<style name="Theme.Datalayer" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarItemBackground">@drawable/selectable_background_datalayer</item>
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
    <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Datalayer</item>
    <item name="android:actionDropDownStyle">@style/DropDownNav.Datalayer</item>
    <item name="android:actionBarStyle">@style/ActionBar.Solid.Datalayer</item>
    <item name="android:actionModeBackground">@drawable/cab_background_top_datalayer</item>
    <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_datalayer</item>
    <item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Datalayer</item>
    <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
</style>

<style name="ActionBar.Solid.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar.Solid">
    <item name="android:background">@drawable/ab_solid_datalayer</item>
    <item name="android:backgroundStacked">@drawable/ab_stacked_solid_datalayer</item>
    <item name="android:backgroundSplit">@drawable/ab_bottom_solid_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="ActionBar.Transparent.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">@drawable/ab_transparent_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="MyTheme.ActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
    <item name="android:textColor">@color/action_bar_text</item>
    <item name="android:actionMenuTextColor">@color/action_bar_text</item>
    <item name="android:titleTextStyle">@color/action_bar_text</item>
</style>

<style name="PopupMenu.Datalayer" parent="@android:style/Widget.Holo.Light.ListPopupWindow">
    <item name="android:popupBackground">@drawable/menu_dropdown_panel_datalayer</item>
</style>

<style name="DropDownListView.Datalayer" parent="@android:style/Widget.Holo.Light.ListView.DropDown">
    <item name="android:listSelector">@drawable/selectable_background_datalayer</item>
</style>

<style name="ActionBarTabStyle.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar.TabView">
    <item name="android:background">@drawable/tab_indicator_ab_datalayer</item>
</style>

<style name="DropDownNav.Datalayer" parent="@android:style/Widget.Holo.Light.Spinner">
    <item name="android:background">@drawable/spinner_background_ab_datalayer</item>
    <item name="android:popupBackground">@drawable/menu_dropdown_panel_datalayer</item>
    <item name="android:dropDownSelector">@drawable/selectable_background_datalayer</item>
</style>

<style name="ProgressBar.Datalayer" parent="@android:style/Widget.Holo.Light.ProgressBar.Horizontal">
    <item name="android:progressDrawable">@drawable/progress_horizontal_datalayer</item>
</style>

<style name="ActionButton.CloseMode.Datalayer" parent="@android:style/Widget.Holo.Light.ActionButton.CloseMode">
    <item name="android:background">@drawable/btn_cab_done_datalayer</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Datalayer.Widget" parent="@android:style/Theme.Holo">
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
</style>

Este é meu novo layout, porém os items do overflow ficaram em branco com fundo branco, e preciso de fundo branco com letras em preto. Lembrando que utilizei o stylegenerator.

<style name="Theme.Datalayer" parent="@android:style/Theme.Holo.Light.DarkActionBar">
    <item name="android:actionBarItemBackground">@drawable/selectable_background_datalayer</item>
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
    <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Datalayer</item>
    <item name="android:actionDropDownStyle">@style/DropDownNav.Datalayer</item>
    <item name="android:actionBarStyle">@style/ActionBar.Solid.Datalayer</item>
    <item name="android:actionModeBackground">@drawable/cab_background_top_datalayer</item>
    <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_datalayer</item>
    <item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Datalayer</item>
   <item name="android:actionMenuTextColor">@color/black</item>
    <!-- Light.DarkActionBar specific -->
    <item name="android:actionBarWidgetTheme">@style/Theme.Datalayer.Widget</item>
</style>

<style name="ActionBar.Solid.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@drawable/ab_solid_datalayer</item>
    <item name="android:backgroundStacked">@drawable/ab_stacked_solid_datalayer</item>
    <item name="android:backgroundSplit">@drawable/ab_bottom_solid_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="ActionBar.Transparent.Datalayer" parent="@android:style/Widget.Holo.ActionBar">
    <item name="android:background">@drawable/ab_transparent_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="PopupMenu.Datalayer" parent="@android:style/Widget.Holo.ListPopupWindow">
    <item name="android:popupBackground">@drawable/menu_dropdown_panel_datalayer</item>
    <item name="android:textColor">@color/black</item>
</style>

<style name="DropDownListView.Datalayer" parent="@android:style/Widget.Holo.ListView.DropDown">
    <item name="android:listSelector">@drawable/selectable_background_datalayer</item>
</style>

<style name="ActionBarTabStyle.Datalayer" parent="@android:style/Widget.Holo.ActionBar.TabView">
    <item name="android:background">@drawable/tab_indicator_ab_datalayer</item>
</style>

<style name="DropDownNav.Datalayer" parent="@android:style/Widget.Holo.Spinner">
    <item name="android:background">@drawable/spinner_background_ab_datalayer</item>
    <item name="android:popupBackground">@drawable/menu_dropdown_panel_datalayer</item>
    <item name="android:dropDownSelector">@drawable/selectable_background_datalayer</item>
    <item name="android:spinnerDropDownItemStyle">@style/mySpinnerItemStyle</item>
</style>

<style name="mySpinnerItemStyle" parent="@android:style/Widget.Holo.DropDownItem.Spinner">
    <item name="android:textColor">@color/black</item>
</style>

<style name="ProgressBar.Datalayer" parent="@android:style/Widget.Holo.ProgressBar.Horizontal">
    <item name="android:progressDrawable">@drawable/progress_horizontal_datalayer</item>
</style>

<style name="ActionButton.CloseMode.Datalayer" parent="@android:style/Widget.Holo.ActionButton.CloseMode">
    <item name="android:background">@drawable/btn_cab_done_datalayer</item>
</style> 

<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Datalayer.Widget" parent="@android:style/Theme.Holo">
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
</style>
Fonte Link
Bruno
  • 1
  • 1
  • 5

Alterar cor do título ActionBar

Como posso alterar a cor do título da ActionBar e a cor do overflow para branco? Esse é o meu style.xml

<!--
    Base application theme for API 14+. This theme completely replaces
    AppBaseTheme from BOTH res/values/styles.xml and
    res/values-v11/styles.xml on API 14+ devices.

-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <!-- API 14 theme customizations can go here. -->
</style>

<style name="Theme.Datalayer" parent="@android:style/Theme.Holo.Light">
    <item name="android:actionBarItemBackground">@drawable/selectable_background_datalayer</item>
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
    <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Datalayer</item>
    <item name="android:actionDropDownStyle">@style/DropDownNav.Datalayer</item>
    <item name="android:actionBarStyle">@style/ActionBar.Solid.Datalayer</item>
    <item name="android:actionModeBackground">@drawable/cab_background_top_datalayer</item>
    <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_datalayer</item>
    <item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Datalayer</item>
    <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
</style>

<style name="ActionBar.Solid.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar.Solid">
    <item name="android:background">@drawable/ab_solid_datalayer</item>
    <item name="android:backgroundStacked">@drawable/ab_stacked_solid_datalayer</item>
    <item name="android:backgroundSplit">@drawable/ab_bottom_solid_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="ActionBar.Transparent.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:background">@drawable/ab_transparent_datalayer</item>
    <item name="android:progressBarStyle">@style/ProgressBar.Datalayer</item>
</style>

<style name="MyTheme.ActionBar.TitleTextStyle" parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
    <item name="android:textColor">@color/action_bar_text</item>
    <item name="android:actionMenuTextColor">@color/action_bar_text</item>
    <item name="android:titleTextStyle">@color/action_bar_text</item>
</style>

<style name="PopupMenu.Datalayer" parent="@android:style/Widget.Holo.Light.ListPopupWindow">
    <item name="android:popupBackground">@drawable/menu_dropdown_panel_datalayer</item>
</style>

<style name="DropDownListView.Datalayer" parent="@android:style/Widget.Holo.Light.ListView.DropDown">
    <item name="android:listSelector">@drawable/selectable_background_datalayer</item>
</style>

<style name="ActionBarTabStyle.Datalayer" parent="@android:style/Widget.Holo.Light.ActionBar.TabView">
    <item name="android:background">@drawable/tab_indicator_ab_datalayer</item>
</style>

<style name="DropDownNav.Datalayer" parent="@android:style/Widget.Holo.Light.Spinner">
    <item name="android:background">@drawable/spinner_background_ab_datalayer</item>
    <item name="android:popupBackground">@drawable/menu_dropdown_panel_datalayer</item>
    <item name="android:dropDownSelector">@drawable/selectable_background_datalayer</item>
</style>

<style name="ProgressBar.Datalayer" parent="@android:style/Widget.Holo.Light.ProgressBar.Horizontal">
    <item name="android:progressDrawable">@drawable/progress_horizontal_datalayer</item>
</style>

<style name="ActionButton.CloseMode.Datalayer" parent="@android:style/Widget.Holo.Light.ActionButton.CloseMode">
    <item name="android:background">@drawable/btn_cab_done_datalayer</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Datalayer.Widget" parent="@android:style/Theme.Holo">
    <item name="android:popupMenuStyle">@style/PopupMenu.Datalayer</item>
    <item name="android:dropDownListViewStyle">@style/DropDownListView.Datalayer</item>
</style>