I just tried to post a question containing the following text:
I'm building a music app, which has an ongoing notification. I meet the text color problem of notifications:
1. On Galaxy S with Android 2.3.3, the notification background is black, and also the texts are. That makes Galaxy S users hard to read the texts.
2. On Motorola Droid with Android 2.2.2, the notification background is white, and so the texts are. That also makes text hard to read.
My current code is:
### Layout XML ###
<LinearLayout android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="vertical">
<TextView android:id="@+id/notifbar_trackname"
style="@style/NotificationTitle"
android:focusable="true" android:singleLine="true"
android:layout_gravity="left" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:id="@+id/notifbar_artist"
style="@style/NotificationText"
android:layout_gravity="left" android:scrollHorizontally="true"
android:ellipsize="end" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:id="@+id/notifbar_queue"
style="@style/NotificationText"
android:layout_gravity="left" android:scrollHorizontally="true"
android:ellipsize="end" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
### styles.xml in values/ ###
<style name="NotificationText">
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="NotificationTitle">
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textStyle">bold</item>
</style>
### styles.xml in values/v9/ ###
<style name="NotificationText" parent="android:TextAppearance.StatusBar.EventContent" />
<style name="NotificationTitle" parent="android:TextAppearance.StatusBar.EventContent.Title" />
Does anyone know what's wrong in my code? Thank you!
When I try to confirm, the system says:
Oops! Your edit couldn't be submitted because:
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.
I totally have no idea what the system is complaining about. I have all code indented by 4 spaces.
Can anyone help?
###
for the headings - the#
s in front will do