Saturday, April 2, 2011

Re: [android-developers] Layout Buttons have no gradient on Droid X

On Fri, Apr 1, 2011 at 5:37 PM, Marke2112 <ellender@mlkerns.com> wrote:
> I developed a simple app on my Droid (os v2.2.2).  The homepage has 4
> buttons on it that display the default gradient gray background.
> Everything looks great.  When I install the app on any of our in-
> office Motorola Droid X (os v2.2 and v2.2.1) phones, the buttons are
> dark with no gradient.
>
> I've combed the forums, created a new hello world default project and
> added a single button to confirm that it wasn't something goofy I did
> in my app, and even tried manually setting the background color of the
> button (see below).
>
> v.getBackground().setColorFilter(Color.parseColor("#DDDDDD"),
> PorterDuff.Mode.DST);

Note that you are not manually setting the background color of the
button. You are manually setting a color filter on the background of
the button.

> Everything looks great on the Droid, all buttons look dark and lack
> gradient on the Droid X.
>
> What am I missing???

If I had to guess, Motorola modified some resource that you are
explicitly or implicitly relying upon. You may want to copy the
standard button background out of the SDK and into your project, then
use that for your buttons (e.g., via a theme).

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

Android Training...At Your Office: http://commonsware.com/training

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

No comments:

Post a Comment