title: view.getTop() reutrns wrong result
body: <p>I have this xml, with the layout surface(which doesnt cover the whole screen):</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/FrameLayout1"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_gravity="bottom"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="10dp"
          android:orientation="vertical" &gt;
      &lt;/LinearLayout&gt;
  
  
      &lt;LinearLayout
          android:id="@+id/surface"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:layout_weight="1" &gt;
      &lt;/LinearLayout&gt;
  
  
  
  
  &lt;RelativeLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_marginEnd="0dp"
      android:layout_gravity="bottom" &gt;
  
      &lt;ImageView
          android:id="@+id/right"
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:layout_alignTop="@+id/down"
          android:layout_toRightOf="@+id/down"
          android:src="@drawable/right" /&gt;
  
      &lt;ImageView
          android:id="@+id/left"
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:layout_alignTop="@+id/down"
          android:layout_toLeftOf="@+id/down"
          android:src="@drawable/left" /&gt;
  
      &lt;ImageView
          android:id="@+id/up"
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:layout_alignParentTop="true"
          android:layout_toLeftOf="@+id/right"
          android:src="@drawable/up" /&gt;
  
      &lt;ImageView
          android:id="@+id/down"
          android:layout_width="50dp"
          android:layout_height="50dp"
          android:layout_below="@+id/up"
          android:layout_centerHorizontal="true"
          android:src="@drawable/down" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I took control of <code>surface</code> in the mainActivity and tried to draw a on it's borders a frame with width of 10px.</p>
  
  <p>here the the mainActivity:</p>
  
  <pre><code>            public class MainActivity extends Activity  {
          GameView gv;
  
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
  
              setContentView(R.layout.game_view);
              LinearLayout surface = new LinearLayout(this);
              surface = (LinearLayout)findViewById(R.id.surface);
              gv= new GameView(this,surface);
              surface.addView(gv);
      }
  }
  </code></pre>
  
  <p>here is the GameView class:</p>
  
  <pre><code>   public class GameView extends SurfaceView implements Runnable {
  
          private boolean isRunning=false;
          private final long FPS=12;
          int PART_SIZE=6;
  
          private SurfaceHolder holder;
          Thread snakethread;
          LinearLayout view;
  
  
      public GameView(Context context,LinearLayout view) {
          super(context);
          this.view=view;
          this.a=new Arena();
          snakethread=new Thread(this);
          holder= getHolder();
          this.setBackgroundColor(Color.TRANSPARENT);                 
          this.setZOrderOnTop(true);
          getHolder().setFormat(PixelFormat.TRANSPARENT);
  
          holder.addCallback(new SurfaceHolder.Callback(){
  
              @Override
              public void surfaceCreated(SurfaceHolder arg0) {
                  setRunning(true);
                  snakethread.start();
  
              }
  
              @Override
              public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2,int arg3) {
  
  
  
              }
  
              @Override
              public void surfaceDestroyed(SurfaceHolder arg0) {
  
                  setRunning(false);
  
                  while(true){
                      try {
                          snakethread.join();
                      } catch (InterruptedException e) {
                          // TODO Auto-generated catch block
                          e.printStackTrace();
                      }
                  }
              }
      });
  }
  
      public void run() {
          long stepPerSecond=1000/FPS;
          long startTime;
          long sleepTime;
          Canvas c = null;
          try{
              c=this.getHolder().lockCanvas();
              synchronized (this.getHolder()) {
                 c.drawColor(Color.BLUE);
                 Paint p=new Paint();
                 p.setColor(Color.BLACK);
                 c.drawRect(view.getLeft(), view.getTop(), view.getLeft()+10, view.getBottom(),p);
                 c.drawRect(view.getLeft(), view.getTop(),view.getRight(),view.getTop()+10,p);
                 c.drawRect(view.getRight()-10, view.getTop(), view.getRight(),view.getBottom(),p);
                 c.drawRect(view.getLeft(), view.getBottom()-10, view.getRight(),view.getBottom(),p);
                  }
          }
          catch(Exception e){
          }
          finally{
              if(c!=null){
                  this.getHolder().unlockCanvasAndPost(c);
              }
          }
  
      }
  </code></pre>
  
  <p>The problem is that the whole frame is approximately 6px under the view's Top,under where is should be. i mean that the <code>view.getTop()</code> and <code>view.getBottom()</code> return a worng result, a result that is bigger in approximately 6px then what it should be (if the view's top coordinate is x, then it return x+6).</p>