I appreciate the reply, however I don't think I understand, I have 2
colors I set the positions to  {.75f,.99f}  but it looks exactly the
same as if I just leave it as null.  I have tried experimenting with
some other values too but it always looks the same to me.
Here is a code snippet

                positions = new float[2];
                positions[1] = .75f;
                positions[0] = .99f;
                grad = new RadialGradient(circleX, circleY, circleR, colors,
positions, TileMode.CLAMP);
                if(values[2] <= values[0]/2)Pallet.getInstance().white.setShader
(grad);
                canvas.drawCircle(circleX, circleY, circleR - 3, 
Pallet.getInstance
().white);

On Jan 15, 10:56 am, Romain Guy <romain...@android.com> wrote:
> It does matter, the positions are numbers between 0 and 1 indicating
> where each color stop should be in the gradient (0 == center, 1 ==
> outside.)
>
>
>
>
>
> On Fri, Jan 15, 2010 at 1:33 AM, schwiz <sch...@gmail.com> wrote:
> > Ok I was making a stupid mistake and not calling new before I set the
> > floats in the array, so my forceclose is fixed, however it doesn't
> > matter what numbers I put the in the array the gradient always looks
> > the same.  How can I give the inner color more weight?
> > Thanks!
> > Nathan
>
> > On Jan 15, 3:25 am, schwiz <sch...@gmail.com> wrote:
> >> I am having problems with the constructor RadialGradient (float x,
> >> float y, float radius, int[] colors, float[] positions,
> >> Shader.TileMode tile) If I don't pass null into positions I get a
> >> force close the logcat spits out a bunch of stuff about frame layout.
> >> So my question is what exactly do they mean when they say positions is
> >> the relative of each color in the array.  The end result I want is for
> >> the inner color to have more weight than the outer color.
> >> Thanks for your time!
> >> Nathan
>
> > --
> > 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+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to