Wednesday, June 22, 2011

[android-developers] Re: Arrange widgets in a circle

Hi Nik and Zsolt! Thanks for your responses!

Yeah, I would need to have the conveniences of View objects (listeners
and such). I would also need to be able to rotate the Canvas each time
the user clicks and drags on an image and still be able to track which
image was clicked.

- Zarah.

On Jun 23, 6:56 am, Zsolt Vasvari <zvasv...@gmail.com> wrote:
> But I think he wants the other niceties, such as the visible state
> changes, etc, at least that way my impression.  Those things aren't
> trivial to implement.
>
> Of course, if that's not a requirement, just use a Canvas object.
>
> On Jun 22, 10:15 pm, niko20 <nikolatesl...@yahoo.com> wrote:
>
>
>
>
>
>
>
> > I would suggest using a Canvas and just drawing yourself. Then in the
> > onTouch handler just do the match to find which circle was clicked.
> > You could use RelativeLayout too if you wanted to use views.
>
> > -nik
>
> > On Jun 22, 5:56 am, Zsolt Vasvari <zvasv...@gmail.com> wrote:
>
> > > Yes, looks like it is.  Sorry, I didn't know that as I've never used
> > > AbsoluteLayout.
>
> > > I guess you could use FrameLayout and then give each view an
> > > appropriate layout_marginLeft and layout_marginTop.
>
> > > On Jun 22, 6:44 pm, Zarah <zarahj...@gmail.com> wrote:
>
> > > > Hi Zsolt!
>
> > > > But isn't that deprecated already?
>
> > > > - Zarah.
>
> > > > On Jun 22, 6:40 pm, Zsolt Vasvari <zvasv...@gmail.com> wrote:
>
> > > > > Use an AbsoluteLayout
>
> > > > > On Jun 22, 6:33 pm, Zarah <zarahj...@gmail.com> wrote:
>
> > > > > > Hi guys,
>
> > > > > > This is such a n00b question but I hope someone helps me. :)
>
> > > > > > I have always made apps that make use of traditional widgets so when
> > > > > > it comes to things like this I am totally at a loss. :(
>
> > > > > > Anyhooo, my aim is to display a set of images of beads into a circle
> > > > > > (sort of forming a bracelet), with each bead being clickable. Some of
> > > > > > the beads are not perfect spheres (some are oblong-ish), so I would
> > > > > > have to rotate the images by some degrees to either left or right to
> > > > > > make them look like they are stringed together.
>
> > > > > > I don't have an idea how to start doing this because I don't know how
> > > > > > I should tell the OS where to place the images. Should I use a Canvas?
> > > > > > Learn OpenGL?
>
> > > > > > If I use a Canvas, I would end up having a bitmap with all the images,
> > > > > > right? Can I still make the images clickable?
>
> > > > > > If I use OpenGL, is it an overkill? The main animation I would have to
> > > > > > do is simply have the circle rotate when the user clicks and drags on
> > > > > > a bead.
>
> > > > > > Thank you in advance!
>
> > > > > > - Zarah.- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

--
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