I have this :
and what i want exactly is that to show portion of Bitmap via coords(X,Y) of object with OnTouchListener(orange square<
Sorry, whilst looking in more detail coming up with solution i think i found it and I am at work so can you try this:
Use event.getX() not view.getX(). the view.getX() returns position of the view you are touching not the touch event you are interested in.
This is the Y coordinate which will likely be inverted.
so event.getX() is the position of the touch event.
event.getY() is the inverted Y position so getHeight() - event.getY() will give you the Y position you are after.
EDIT
In the case of MOTION_MOVE getX and getY return the most recent and maintains historical data. i guess the most recent one is the most valuable as that's where you will be drawing.
In that case use batching quote from documentation:
Batching - http://developer.android.com/reference/android/view/MotionEvent.html
For efficiency, motion events with ACTION_MOVE may batch together multiple movement samples within a single object. The most current pointer coordinates are available using getX(int) and getY(int). Earlier coordinates within the batch are accessed using getHistoricalX(int, int) and getHistoricalY(int, int). The coordinates are "historical" only insofar as they are older than the current coordinates in the batch; however, they are still distinct from any other coordinates reported in prior motion events. To process all coordinates in the batch in time order, first consume the historical coordinates then consume the current coordinates.