You want to use density-independent pixels when considering device screen size and column sizes.
I do something similar to this in one of my apps, Housters, actually. (If you want some visualization for my answer, hit up the Google Play Store.) I'll answer in pseudo code, since you've given a spread of possible products you might use.
First, I determine if it's a tablet or not. This is rather arbitrary these days, but the following formula works well for me:
var isTablet = Math.min(platformWidthInDP, platformHeightInDP) > 500;
This correctly identifies my Nexus 5, EPIC 4G, EVO 4G, Galaxy S3, and others I've tested as phones, and Nexus 7/10, Tab 7+/10, and others as tablets.
For phones, I always use 1 column, regardless of orientation. It was just too squashed in landscape, especially when the keyboard is up.
For tablets, I calculate a relatively desirable width based on wanting the columns to fit well on the screen. I take the least of the screen dimensions, divide it by two, and then make sure it's at least 320dp
wide (you might be able to tolerate a smaller value, depending on your column content, such as 250dp
).
var minPlatformWidth = Math.min(platformWidthInDP, platformHeightInDP));
var width = Math.max(minPlatformWidth / 2, 320);
This way, even with all the variations in screen sizes out there, my columns size nicely to fill the screen. And they have a static size, so there isn't too much trickery going on when the user reorients the device.