0

this question is related to created a "draw/ scribble" application.

    draw = new Draw(this);
    setContentView(R.layout.activity_main);

If I want my buttons to appear, that may enhance the application, such as changing color, the width of the stroke, clearing the bitmap/ canvas etc then I need the argument to take R.layout....

However,

 setContentView(draw);

Takes my custom view, where the touch listeners are. If I have this custom view on the application then my buttons do not appear, since the view is focused on the custom view, draw.

My question is, how can I add widgets to my application and still have the custom view that allows the application to draw.

Theory wise, will I have to dynamically create the buttons/ widgets on the custom view?

Rami
  • 7,663
  • 11
  • 32
  • 64
Moynul
  • 595
  • 7
  • 25
  • Put your custom View in the layout, just like you would any other View. [Here's a post](http://stackoverflow.com/a/2695649) detailing how you can do that. – Mike M. Dec 10 '15 at 10:49
  • Mike.M my question has been answered. Admins, how can I close this thread? – Moynul Dec 10 '15 at 20:38

0 Answers0