[Q] Edit (Menu) Text Color

Search This thread

wallla

Senior Member
Jun 13, 2010
100
12
Hello,

I want to change to text color of the popup-menu from black to white.
Here's the reason why:
forumgmpa.jpg


I changed the background graphics from white to black. So the text has to get white.

I just can't find a clue what file to edit.
Would be great if anyone could give a hint.

Thanks in advance!
 
Last edited:
  • Like
Reactions: seljachina

sniffs

Senior Member
Oct 16, 2006
170
22
Does this not work in the DX or something? I extracted my framework apk but dont have the value folder nor an styles.xml ??
 

wallla

Senior Member
Jun 13, 2010
100
12
Does this not work in the DX or something? I extracted my framework apk but dont have the value folder nor an styles.xml ??

To get the values folder it isn't enough to just unzip the apk.
You have to decompile it with APKTool. Then change the xml and compile it back.

However, I got problems with the latest version of the tool. My phone's stuck in a boot loop when compiling with it. The former version 1.3.1 works fine.
This issue is described here.
Also, you have to copy the Manifest file and the META-INF folder from the original framework apk to the new compiled one.
 

wallla

Senior Member
Jun 13, 2010
100
12
Oh, and another thing.
If you have a menu where you can click on a button named "More", this is what you get:

problem2kzgs.jpg


To make this text become white you have to change

Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
        <item name="listViewStyle">@style/Widget.ListView.Menu</item>
        <item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
        <item name="background">@null</item>
        <item name="itemTextAppearance">?[COLOR="Red"]textAppearanceLargeInverse[/COLOR]</item>
</style>
to
Code:
<style name="Theme.ExpandedMenu" parent="@style/Theme">
        <item name="listViewStyle">@style/Widget.ListView.Menu</item>
        <item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
        <item name="background">@null</item>
        <item name="itemTextAppearance">?[COLOR="Red"]textAppearanceLarge[/COLOR]</item>
</style>

I think.
 

wallla

Senior Member
Jun 13, 2010
100
12
It doesn't work, if the textAppearanceLarge is black, too.

You can directly make it white via
Code:
<item name="itemTextAppearance">#ffffffff</item>
 
  • Like
Reactions: jellette

tnpapadakos

Senior Member
Dec 20, 2009
3,053
1,103
Pittsburgh, PA
so after doing that, how's your menu>settings>sound working...does it open?
i did this on my rom (cm 6.1 d/s) and menu is black with white text, expanded menus are black with white text, but certain things are force closing due to a layout error...

12-20 13:35:06.860 E/AndroidRuntime( 1015): FATAL EXCEPTION: main
12-20 13:35:06.860 E/AndroidRuntime( 1015): java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.


is the brunt of it

beautiful widgets wouldnt work either
sound, call settings, and some other assorted submenus are force closing for me
 
Last edited:

wallla

Senior Member
Jun 13, 2010
100
12
so after doing that, how's your menu>settings>sound working...does it open?
i did this on my rom (cm 6.1 d/s) and menu is black with white text, expanded menus are black with white text, but certain things are force closing due to a layout error...

12-20 13:35:06.860 E/AndroidRuntime( 1015): FATAL EXCEPTION: main
12-20 13:35:06.860 E/AndroidRuntime( 1015): java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.


is the brunt of it

beautiful widgets wouldnt work either
sound, call settings, and some other assorted submenus are force closing for me
Sounds like there's a syntax error in the file. You're sure you made no mistake?

I've no problems at all with the changes described in this thread.
 

wallla

Senior Member
Jun 13, 2010
100
12
You coppied... But you replaced the old one with it, right?
Just adding it at the bottom doesn't work.

However, I'm sure you already know that.
 

Skyllos

Senior Member
Dec 22, 2010
115
8
Im on a cm6.2 rom for the eris and i think im missing somthing or not doing somthing, i got the menu to work going into styles.xml and i changed

<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimaryInverse</item>

to

<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">@color/bright_foreground_dark</item>

to get the text to show and than i changed


verticalDivider">@drawable/divider_vertical_bright

to

verticalDivider">@drawable/divider_vertical_dark

And that got the virtical divider to show. now it all looks great but widgets, widget settings, settings and anything like that fc's, so am i missing somthing? Ohh and im using apk manager
 
Last edited:

wallla

Senior Member
Jun 13, 2010
100
12
so after doing that, how's your menu>settings>sound working...does it open?
i did this on my rom (cm 6.1 d/s) and menu is black with white text, expanded menus are black with white text, but certain things are force closing due to a layout error...

12-20 13:35:06.860 E/AndroidRuntime( 1015): FATAL EXCEPTION: main
12-20 13:35:06.860 E/AndroidRuntime( 1015): java.lang.RuntimeException: Binary XML file line #2: You must supply a layout_width attribute.

Im on a cm6.2 rom for the eris and i think im missing somthing or not doing somthing, i got the menu to work going into styles.xml and i changed

<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">?textColorPrimaryInverse</item>

to

<style name="TextAppearance.Widget.IconMenu.Item" parent="@style/TextAppearance.Small">
<item name="textColor">@color/bright_foreground_dark</item>

to get the text to show and than i changed


verticalDivider">@drawable/divider_vertical_bright

to

verticalDivider">@drawable/divider_vertical_dark

And that got the virtical divider to show. now it all looks great but widgets, widget settings, settings and anything like that fc's, so am i missing somthing? Ohh and im using apk manager

Now, that you mention apkmanager...

What version of APKTool are you two using? (APKManager is also only using APKTool, in the inside).

Like I described in post #5: With the newest version of APKTool I also have problems. My device even didn't boot up any more.
Try to use version 1.3.1.
 

Skyllos

Senior Member
Dec 22, 2010
115
8
im using the vs you post a few pages back

Edit: ohh i didnt realize apk manager is using apktools, which version of ApkTools is in the Apk Manager folder?

Update: i changed ApkTool in the apk manager folder for version 1.3.1 and that created a bootloop
 
Last edited:

ACD168

Senior Member
Aug 28, 2010
1,530
135
I'm trying to do this on a sense ROM a I had the menu background black at one time but had the same text problem I want to try and see if this will work but I can't for the life of me remember how I changed the menu background to black do you guys have any ideas? thanks in advance!
 

wallla

Senior Member
Jun 13, 2010
100
12
im using the vs you post a few pages back

Edit: ohh i didnt realize apk manager is using apktools, which version of ApkTools is in the Apk Manager folder?

Update: i changed ApkTool in the apk manager folder for version 1.3.1 and that created a bootloop
I never used apkmanager. But I could guess additionaly to building the apk, it also compresses the PNGs, zipaligns everything and signs it.
I think I read about some of that stuff doesn't go well with system-files.

So, in conclusion, I would advise you to make a build just with apktool. It's really easy to use.

Oh, and don't forget to copy/overwrite the Manifest file and the META-INF folder from the original framework apk to the new compiled one, as I already wrote in post #5.

I'm trying to do this on a sense ROM a I had the menu background black at one time but had the same text problem I want to try and see if this will work but I can't for the life of me remember how I changed the menu background to black do you guys have any ideas? thanks in advance!
It's a nine-patch-png file.
 

Skyllos

Senior Member
Dec 22, 2010
115
8
I just re-did it again with just apktool instead, And its still the same issue. It looks great menu works but trying to open settings up on anything FC's
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Oh, and another thing.
    If you have a menu where you can click on a button named "More", this is what you get:

    problem2kzgs.jpg


    To make this text become white you have to change

    Code:
    <style name="Theme.ExpandedMenu" parent="@style/Theme">
            <item name="listViewStyle">@style/Widget.ListView.Menu</item>
            <item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
            <item name="background">@null</item>
            <item name="itemTextAppearance">?[COLOR="Red"]textAppearanceLargeInverse[/COLOR]</item>
    </style>
    to
    Code:
    <style name="Theme.ExpandedMenu" parent="@style/Theme">
            <item name="listViewStyle">@style/Widget.ListView.Menu</item>
            <item name="windowAnimationStyle">@style/Animation.OptionsPanel</item>
            <item name="background">@null</item>
            <item name="itemTextAppearance">?[COLOR="Red"]textAppearanceLarge[/COLOR]</item>
    </style>

    I think.
    1
    Hello,

    I want to change to text color of the popup-menu from black to white.
    Here's the reason why:
    forumgmpa.jpg


    I changed the background graphics from white to black. So the text has to get white.

    I just can't find a clue what file to edit.
    Would be great if anyone could give a hint.

    Thanks in advance!
    1
    Thank you so much.

    Helps me a lot!
    1
    It doesn't work, if the textAppearanceLarge is black, too.

    You can directly make it white via
    Code:
    <item name="itemTextAppearance">#ffffffff</item>