H,
You can try putting a 2.3 specific layout into "res/layout-v9". You'd
then be able to use the new style, provided you build with 2.3, and
still remain compatible with earlier versions.
-- Kostya
26.01.2011 15:42, H пишет:
So I've got a custom view being used as a RemoteViews in a notification.
Looking in the 2.2. resource, I can see
\layout\status_bar_latest_event_content.xml where it explicitly sets
the colour of the title and text to "ff000000". Which works nicely
under 2.2 stock. The text is black.
But under 2.3, the notification bar is darker and black text is not
visible. Looking in the same file under 2.3 I find it is now using a
style
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title".
This is using ?textColorPrimaryInverse which is white but the same
value under 2.2 is also white.
The TextAppearance.StatusBar style hierarchy doesn't exist for 2.2 or
below.
So should I check for the sdk version and if running 2.3+ then get the
value of the style attribute and manually override the color for the
custom view..? Seems a bit of a faff to have to do that? And how do I
compile it to refer to that new attribute when I'm targetting 2.2? Any
way to get it to work purely in xml with no additional java faff..?
But I'm also wondering about all that theming going on for custom roms
- how do they handle this..? For a 2.2. phone, the text colour of
black is hardcoded into that layout. So does that mean that no theme
for a 2.2. device can change the colour of the notification bar
background to black otherwise all the notifications will be
unreadable? Am I missing something here?
--
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
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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