+
+ // Scale the size of the Tab bar for different screen densities
+ // This probably won't be needed when we start supporting ICS+ tabs.
+ DisplayMetrics metrics = new DisplayMetrics();
+ getWindowManager().getDefaultDisplay().getMetrics(metrics);
+ int density = metrics.densityDpi;
+
+ if (density==DisplayMetrics.DENSITY_XHIGH)
+ tabHeight = 65;
+ else if (density==DisplayMetrics.DENSITY_HIGH)
+ tabHeight = 45;
+ else if (density==DisplayMetrics.DENSITY_MEDIUM)
+ tabHeight = 35;
+ else if (density==DisplayMetrics.DENSITY_LOW)
+ tabHeight = 25;
+ else
+ tabHeight = 65;
+