Hi guys, this is a really simple question on which I've found no answer :/ How can I quickly access the screen resolution (width, height) as integer values?
I've tried this one, but it always shows zero on my emulator:
DisplayMetrics dm = new DisplayMetrics();
int width = dm.widthPixels / 2;
In my case I want to dynamically create a table with tableRows, each containing two cols. This cols all shall fill half of the screen in width.
Can someone give me a hint?