Bug 1046206 - Change TabsPanel to use alternative layout when isNewTablet (r=lucasr)

This commit is contained in:
Martyn Haigh 2014-09-24 11:55:47 +01:00
parent 82a618398e
commit 878ee5bf23

View File

@ -13,6 +13,7 @@ import org.mozilla.gecko.GeckoApplication;
import org.mozilla.gecko.GeckoProfile;
import org.mozilla.gecko.LightweightTheme;
import org.mozilla.gecko.LightweightThemeDrawable;
import org.mozilla.gecko.NewTabletUI;
import org.mozilla.gecko.R;
import org.mozilla.gecko.Telemetry;
import org.mozilla.gecko.TelemetryContract;
@ -66,7 +67,11 @@ public class TabsPanel extends LinearLayout
}
public static View createTabsLayout(final Context context, final AttributeSet attrs) {
return new TabsListLayout(context, attrs);
if (NewTabletUI.isEnabled(context)) {
return new TabsGridLayout(context, attrs);
} else {
return new TabsListLayout(context, attrs);
}
}
public static interface TabsLayoutChangeListener {