I am trying to draw a rectangle over a canvas and I am facing troubles to understand the in-depth of rectangle draw of Android. I\'ve read tutorials and every possible but I
X runs horizontally, from left to right. Y runs vertically, from top to bottom. It's exactly the same as on your graphics. So (0/0) is at top left.
When you go "up" Y will of course get smaller, as it grows from top to bottom.
You have to pay attention to laying out elements like ListViews, these will give a partial (or new, you cannot tell) canvas to your views that are drawn. These views will have 0x0 at their own top/left position. If you need the absolute you have to subsequently call View.getLocationOnScreen() and calculate offsets yourself.