mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1046206 - Change TabsPanel to use alternative layout when isNewTablet (r=lucasr)
This commit is contained in:
parent
82a618398e
commit
878ee5bf23
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user