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/LinearGradient.html On Jan 27, 11:24 am, MobDev <developm...@mobilaria.com> 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 android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en