зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1214602 - Bring back single column layout for tabs tray. r=margaret
This patch will use the single column list on phones in portrait mode again. In landscape mode the multi column grid will be used. In addition to that this patch removes the Nightly flag (Bug 1204917). --HG-- extra : commitid : Cw6uqgLYChb extra : rebase_source : d9e45369adb0bba89f0376c6756eddafc6d71ae1
This commit is contained in:
Родитель
7e6130a355
Коммит
c96f0af751
|
@ -26,6 +26,7 @@ import org.mozilla.gecko.widget.GeckoPopupMenu;
|
|||
import org.mozilla.gecko.widget.IconTabWidget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Rect;
|
||||
import android.util.AttributeSet;
|
||||
|
@ -74,7 +75,9 @@ public class TabsPanel extends LinearLayout
|
|||
|
||||
|
||||
public static View createTabsLayout(final Context context, final AttributeSet attrs) {
|
||||
if (HardwareUtils.isTablet() || AppConstants.NIGHTLY_BUILD) {
|
||||
final boolean isLandscape = context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
|
||||
|
||||
if (HardwareUtils.isTablet() || isLandscape) {
|
||||
return new TabsGridLayout(context, attrs);
|
||||
} else {
|
||||
return new TabsListLayout(context, attrs);
|
||||
|
|
Загрузка…
Ссылка в новой задаче