Reputation: 5033
I am able to get the screen size in the normal activity but I need to get the screen size in a canvas view & manipulate in accordance with it.Any snippet on it will be helpful.Thanks.
Upvotes: 3
Views: 6636
Reputation: 8645
i got widthPixels heightPixels use ing this.
DisplayMetrics metrics = getBaseContext().getResources().getDisplayMetrics();
int w = metrics.widthPixels;
int h = metrics.heightPixels;
Upvotes: 10