Hybris wrote:
> uhm... the problem seems caused by the fact that i set the background
> of the row either from the xml (i want a white background) or by java
> code (i want odd items to be cyan)
> if i remove any setBackround or background attribute the highlight is
> performed correctly
> 
> this makes me wonder on how to set the background to the color i wish
> without breaking the highlight mechanism :/

There are a few options.

You might consider switching the activity to the light theme, as that
will give you a white background and have highlights work:

    <activity
      android:name=".SomeRandomActivity"
      android:label="@string/app_name"
      android:theme="@android:style/Theme.Light">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>

If you do not like that option, you may wish to use a <selector>
drawable XML file instead of a plain color, so you can specify different
values for normal versus selected.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.0 Available!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to