I got the Screen Size by using the following from a activity,
Display display = getWindowManager().getDefaultDisplay();
But the same thing is n
It worked for me!
DisplayMetrics metrics = getApplicationContext().getResources().getDisplayMetrics(); int width = metrics.widthPixels; int height = metrics.heightPixels;
You only needed to get the context.