title: set SurfaceView's margin programmatically
body: <p>I am adding the "SurfaceView" for camera in my layout xml file as,</p>
  
  <pre><code>&lt;SurfaceView
          android:id="@+id/preview"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="95dp"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"/&gt;
  </code></pre>
  
  <p>But I want to set the <strong>marginTop</strong> dynamically. If I want to set the <strong>SurfaceView's</strong> <strong>marginTop</strong> programmatically, How can I do this?</p>
  
  <p>I have searched in the internet. But I didn't get any answer. So anyone help me to do this.</p>