I have a custom view.
When I draw a line from (x,y) to (x+10,y), is the distance in DIP or PX?
I have a custom view.
When I draw a line from (x,y) to (x+10,y), is the distance in DIP or PX?
As documentation says,
At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use.
Thus, all units are in dp.
I believe it's in pixels. If you want to know how to convert from DP to pixels as in if you want your custom view to work with DPs just like all other Views.