xdpi and ydpi were changed to static member