Yes,
I did take into account the fact of the different resolutions... On
the other hand, I am using several Images for my GUI, so I will be
obbliged to use several resolutions anyways to keep the GUI looking
good...
So in the end my question still stands : is it even possible to get a
Image-based Gradient not to look like a shutter (with horizontal
lines) from the 80's ???

On 29 jan, 17:23, Robert Nekic <[email protected]> wrote:
> In that case, you are probably stuck creating multiple versions of
> your image based on resolution and screen density and placing them in
> specific resource folders.  Have you looked at the documentation
> regarding "Resource directory qualifiers for screen size and density"?
>
> http://developer.android.com/intl/fr/guide/practices/screens_support....
>
> Personally, I opted for using simpler gradients via the drawables
> instead of lugging around multiple copies of an image in various
> resolutions in my apk.
>
> On Jan 29, 4:47 am, MobDev <[email protected]> wrote:
>
> > I'd like to use Images (so this image does include a gradient but also
> > several other elements like pre-rendered text but also a complex mix
> > of vertical and radial gradients) so using only LinearGradient or
> > RadialGradient wont work...
> > I am just astounded by the fact that such an png-image (with gradient)
> > doesnt show correctly on a "state-of-the-art" device and platform...
> > so are there any other options ? I've tried the dither:"true"
> > parameter but that simply doesnt work at all...
>
> > On 27 jan, 19:02, Robert Nekic <[email protected]> wrote:
>
> > > Check out LinearGradient and RadialGradient.  You can define gradient
> > > drawables directly instead of using a PNG for that.  The result is a
> > > much nicer, consistent gradient.  Use that for the RelativeLayout's
> > > background and layer images on top of it within the RelativeLayout.
>
> > >http://developer.android.com/intl/fr/reference/android/graphics/Linea...
>
> > > On Jan 27, 11:24 am, MobDev <[email protected]> wrote:
>
> > > > Hi,
> > > > I am using a RelativeLayout and I'd like to use a PNG Image as a
> > > > Background...
> > > > So I have created a nice background Image with some text and a very
> > > > very nice gradient, with my devices screen size (320x480)...
> > > > Afterwards I set this drawable resource as background parameter of the
> > > > RelativeLayout (which btw is the root-element of my Views tree)...
> > > > Result : gradient gets all messed up, I only see horizontal lines of
> > > > different colors mimicking the actual gradient...
> > > > I have tried changing the PNG Image from 24 bit to 32 bit but that
> > > > doesn't make any difference...
> > > > Also I am pretty sure the screen itself can show nice gradients
> > > > because the standard background's of Android's Home screen look
> > > > magnificent !
> > > > Any Idea on what's happening here and how to solve this ?
> > > > Thanks in advance...

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to