title: Android Floating Button not showing
body: <p>I try to make drawing page with canvas and add floating button in corner for some actions. But it is not appearing.
  This is my classes</p>
  
  <p>DrawView.java</p>
  
  <pre><code>public class DrawView extends View implements View.OnTouchListener {
  private List&lt;Point&gt; points = new ArrayList&lt;&gt;();
  private Paint paint = new Paint();
  
  public DrawView(Context c) {
      super(c);
      setFocusable(true);
      setFocusableInTouchMode(true);
      this.setOnTouchListener(this);
      paint.setColor(Color.BLACK);
  }
  
  @Override
  public void onDraw(Canvas canvas) {
      for (Point point : points) {
          canvas.drawCircle(point.x, point.y, 30, paint);
      }
  }
  
  public boolean onTouch(View view, MotionEvent event) {
      Point point = new Point();
      point.x = event.getX();
      point.y = event.getY();
      points.add(point);
      invalidate();
      return true;
  }}
  </code></pre>
  
  <p>And Main activity</p>
  
  <pre><code>public class DrawingPage extends AppCompatActivity {
  private DrawView drawView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_drawing_page);
      drawView = new DrawView(getApplicationContext());
      drawView.setBackgroundColor(Color.WHITE);
      setContentView(drawView);
      drawView.requestFocus();
  }}
  </code></pre>
  
  <p>XML</p>
  
  <pre><code>    &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="reminder.com.picsartdrawing.DrawingPage"&gt;
  
      &lt;android.support.design.widget.FloatingActionButton
          android:id="@+id/myFAB"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@mipmap/ic_launcher"
          app:elevation="4dp"
          android:layout_alignParentBottom="true"
          android:layout_alignParentEnd="true" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>But floating button is not appearing, any solutions?
  <a href="http://i.stack.imgur.com/3lqsB.png" rel="nofollow">Screenshot</a></p>
  
  <p>EDIT!!!
  in Activity's onCreate method I have changed this, and now I have drawing canvas page with button.</p>
  
  <pre><code>RelativeLayout layout = (RelativeLayout) findViewById(R.id.layout);
          drawView = new DrawView(getApplicationContext());
          drawView.setBackgroundColor(Color.WHITE);
          drawView.requestFocus();
          assert layout != null;
          layout.addView(drawView);
  </code></pre>