I'm trying to minimize the number of resources I'm including in an
app, so I'm jumping back and forth between ImageButton and Button.
I have a basic button shape/background design, but it needs to have
independent text and colors. I have a nice white shape and
background, but here's my dilemma:
*If I use ImageButton with setBackgroundDrawable(), I can change the
colors and shading beautifully with setColorFilter(), but the method
for adding text over the image ("up" "down" "left" "right", etc) with
various fonts and sizes eludes me.
*if I use Button with setDrawableBackground(), I can setText(), but
the methods of changing button color on the fly eludes me.
If I have, say, four colors and four text changes, I can do 16
different ImageButtons, or 4 ImageButtons with setColorFilter, or 4
Buttons with setText...but really what I'm looking for is one single
drawable resource where I can change color and text programatically
for both.
(and this is just an example -- my app is really looking at 20+ colors
and 20+ text possibilities, with even more permutations with animation
fadings and such, so the resource savings would really be nice if it's
possible)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---