I am trying to draw x and y axis line, but I can’t get the user’s phone size. How is this done inside a view? I have tried this:
DisplayMetrics dm = new DisplayMetrics();
int width = dm.widthPixels;
int height = dm.heightPixels;
The entire Android class code is the following:
http://pastebin.com/J02irHd8
In an Activity or Context run the following code:
If you are in a View then try