Can I get the default font color from form items like textfield/list?
I am creating a customitem with some text. i need to get the color so that they will all have the same font color.
Can I get the default font color from form items like textfield/list?
I am creating a customitem with some text. i need to get the color so that they will all have the same font color.
Check the Display.getColor() method call
public int getColor(int colorSpecifier)
Returns one of the colors from the high level user interface color scheme, in the form 0x00RRGGBB based on the colorSpecifier passed in.
Parameters:
colorSpecifier - the predefined color specifier; must be one of COLOR_BACKGROUND, COLOR_FOREGROUND, COLOR_HIGHLIGHTED_BACKGROUND, COLOR_HIGHLIGHTED_FOREGROUND, COLOR_BORDER, or COLOR_HIGHLIGHTED_BORDER
Returns:
color in the form of 0x00RRGGBB
Throws:
IllegalArgumentException - if colorSpecifier is not a valid color specifier
Since:
MIDP 2.0
Hartti