Take look in the platform's styles.xml and themes.xml.

These sound somewhat promising:

    <style name="Widget.TextView.PopupMenu">
        <item name="android:clickable">true</item>
        <item
name="android:textAppearance">@style/TextAppearance.Widget.TextView.PopupMenu</item>
    </style>

    <style name="Widget.PopupMenu" parent="Widget.ListPopupWindow">
    </style>

Looking in PhoneWindow.java (in the framework, under base/policy/src/...)
should be useful too - the "legacy" (pre-action bar) menu implementation is
here.

And.... I just looked there myself, and it looks like the code uses this
attribute from the current theme:

        <item
name="panelFullBackground">@android:drawable/menu_background_fill_parent_width</item>

... and so it makes sense that this attribute has the same value (as above)
in the legacy and both Holo themes (I've got 4.1.1 sources open right now).

-- K

2012/8/3 Spiral123 <[email protected]>

> Hi all...
>
> Scratching my head here, need some help.
>
> I'm trying to read the option menu text color for the running device.  I'm
> not interested in trying to override the system menu behavior or anything
> funky, my theory is that if I know what color the text is (or the menu item
> background) then I will be able to display a custom dark or light menu icon
> set for my options depending on how the manufacturer has themed the option
> menu on their particular device.
>
> I don't mind if I need to look internally to source variables as I'm only
> interested in getting this for the 2.2 and 2.3 platforms: 2.1 and below is
> not targeted and I'm not interested in displaying icons in the 3.0 overflow
> menu.  If I know how to get the value I can make sure that my code won't
> break regardless of platform.
>
> Anyone been down this road before?
>
> Nick
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to