android.R.drawable.list_selector_background is a Drawable, not a solid
color. Use Context.getDrawable() and draw that drawable in the
background of your widget.

On Mon, Jul 6, 2009 at 11:30 AM, jcpalmer<[email protected]> wrote:
>
> I have made a custom widget, very similar to JTable in Swing.  It is
> not editable, and all data is replaced at once, allowing easy checking
> for the widest item in each column & custom col sizing at replace
> time.  It is a subclass of LinearLayout, filled with re-usable
> TableRow Objects, sub-classed directly from View.
>
> TableRow is both Clickable, focusable, & focusable In Touch Mode.
> TableRow overrides onDraw(Canvas), calling super.  It draws the first
> column in Black with Lt gray underneath.  If the TableRow isFocused
> () , then a filled rectangle is drawn, before the rest of the cols
> (left or right justified based on data type), and borders.
>
> Where do I get the color, orange, to draw the filled rectangle
> indicating focus?  android.R.drawable.list_selector_background seems
> to be a pointer, value 17301602, not an actual color.  Placing any
> real Color in my code draws things fine.  Is this 17301602 transparent
> or something?  Am I doing this wrong, or do I just need to know how to
> fine the orange?
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
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