I'm having a table with text and 4 quads.  

Older Screenshot:  

![table with text (2x size of the 4 quads](https://i.stack.imgur.com/mMA1J.png)

The phone design works well, but if I try to make it for tablets it fails:

```
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
width = size.x;
height = size.y;

int w=(int) ((width-(table.getPaddingLeft()+table.getPaddingRight())*2)/6);
//w->minimum widthsize of one quad view

```

I've a static listview menu in tablet mode with 225dip

I've tried to put it like: `+drawer` before `)/6);` it into the calculation and the same problem;  

with this precalc.:

```
int drawer=0;//for phones
Resources r = getResources();
float pixels = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 225, r.getDisplayMetrics());

if(drawerLayout==null) {
    drawer=pixels;
}

```

What's wrong..?