title: Custom View Question
body: <p>I am new to Android development and I have a question regarding custom views and using xml for view customization.</p>
  
  <p>So i my code I am having a view defined using the extended view class i.e.</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      Display display = getWindowManager().getDefaultDisplay();
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  WindowManager.LayoutParams.FLAG_FULLSCREEN);        
      draw = new DrawView(this, display.getWidth(), display.getHeight(), vibrator);
      setContentView(draw);//custom view called DrawView
  }   
  </code></pre>
  
  <p>And in the DrawView class I am performing operations using the canvas.</p>
  
  <p>My question is,</p>
  
  <ol>
  <li><p>Can I use XML layouts combined with this view that I have defined?</p></li>
  <li><p>I need to add a few buttons to this custom view, how can I achieve that in this scenario.</p></li>
  </ol>
  
  <p>Thank you.</p>