Well, alrighty then...

I have cases where graphics coincide with other widgets...

Perhaps the idea you need is to add a ImageView widget to your
main.xml. Then you can grab it's R.id.blah and "draw" into it.

I use a RELATIVE LAYOUT as the base and I have a static ICON like
thingy in the upper left corner; some labels (textviews) to its right,
then below all of that I have another pair of imageviews; one is a
small icon that gets "placed" over the larger, background image. The I
grab the DOWN, MOVE, and UP on the image to decide if the user is
dragging the image around, zooming in, or zooming out.

By using the context of *just* the image container, you should be able
to do whatever you want inside that without effecting anything else on
the screen.

I have a video (prepared for my client) which demonstrates what I've
been saying above. If you want, go to my PROFILE, and email me, and
I'll send back the video (or a link where you can get it.)

If what I've done is on the right track  I'll send you the source as
well.


On Apr 16, 2:41 pm, BobG <[email protected]> wrote:
> Hi Tony. Thanks for replying. Seems like what happens is: I make the
> GraphicsView view that extends view, and the first thing one has to do
> in graphics mode is drawPaint, which clears the whole screen,
> including the buttons which had been drawn in the startup Textview. So
> Someone needs to point me to the example that shows a big square of
> graphics in the middle of a portrait screem with a pair of buttons on
> the right or left of the graphics, maybe labeled 'up' and 'dn' and
> out' and 'in' or similar. I'm tempted to try and draw some ascii
> graphics, but they always get formatted into a mishmash.
> =================================================================
> On Apr 16, 9:20 am, tony obrien <[email protected]> wrote:
>
> > You can (easily?) create a simple main.xml layout file that contains,
> > say, a LINEAR LAYOUT with the buttons...
>
> > Then in your programming call the SetContextView(R.layout.main) and
> > you WILL have an R.id.BUTTON#1 to use.
>
> > You may have to call the super(canvas) in the override of onDraw() to
> > ensure that xml items get drawn in addition to whatever you're drawing
> > in onDraw().
>
> --
> 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 
> athttp://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-beginners?hl=en

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