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().



On Apr 15, 10:20 pm, BobG <[email protected]> wrote:
> So I have a class graphicsView that extends View, and in that I do
> that @Override onDraw(Canvas canvas) and start drawing my picture with
> a paint and canvas.drawRect and drawLine and drawText.. So how would
> one add a couple buttons to this canvas, since I declared it
> programmatically, I cant look it up in findViewById(R.id,Button01)?
> Seems like I need a 'graphics button' rather than a 'text button'?? I
> dont have a good model of this yet as you can see. Insight
> appreciated.
>
> --
> 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