title: How to drag and align an item in Android custom view?
body: <p>I created this custom view to add a layer at the top of app</p>
  
  <p>There is a draggable circle in the view</p>
  
  <pre><code>public class LockView extends View {
  
      public LockView(Context context) {
          super(context);
          setClickable(true);
          setBackgroundColor(0x55ff0000);
          setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View view) {
                  ((ViewGroup) getParent()).removeView(LockView.this);
              }
          });
      }
  
      @Override
      protected void onDraw(Canvas canvas) {
          super.onDraw(canvas);
  
          ShapeDrawable circle=new ShapeDrawable(new OvalShape());
          circle.setBounds(10,10,100,100);
          circle.getPaint().setARGB(0xff,0,0xff,0);
          circle.draw(canvas);
      }
  }
  </code></pre>
  
  <p>Usage:</p>
  
  <pre><code>LockView lockView = new LockView(this);
  WindowManager.LayoutParams baseParams = new WindowManager.LayoutParams(
          WindowManager.LayoutParams.MATCH_PARENT,
          WindowManager.LayoutParams.MATCH_PARENT,
          WindowManager.LayoutParams.TYPE_PHONE,
          WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
          PixelFormat.TRANSLUCENT);
  addContentView(lockView, baseParams);
  </code></pre>
  
  <p>Question is:</p>
  
  <ol>
  <li><p>How to make the circle draggable? I cannot found any method to set listener to circle.</p></li>
  <li><p>How to align the circle to right bottom?</p></li>
  </ol>