зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e755879c138c (bug 1133770) for bustage.
CLOSED TREE DONTBUILD
This commit is contained in:
Родитель
2b0e4efb61
Коммит
88cbae6a98
|
@ -66,7 +66,6 @@ import org.mozilla.gecko.sync.setup.SyncAccounts;
|
|||
import org.mozilla.gecko.tabs.TabHistoryController;
|
||||
import org.mozilla.gecko.tabs.TabHistoryFragment;
|
||||
import org.mozilla.gecko.tabs.TabHistoryPage;
|
||||
import org.mozilla.gecko.tabs.TabStrip;
|
||||
import org.mozilla.gecko.tabs.TabsPanel;
|
||||
import org.mozilla.gecko.tabs.TabHistoryController.OnShowTabHistory;
|
||||
import org.mozilla.gecko.toolbar.AutocompleteHandler;
|
||||
|
@ -177,7 +176,6 @@ public class BrowserApp extends GeckoApp
|
|||
public ViewFlipper mActionBarFlipper;
|
||||
public ActionModeCompatView mActionBar;
|
||||
private BrowserToolbar mBrowserToolbar;
|
||||
private TabStrip mTabStrip;
|
||||
private ToolbarProgressView mProgressView;
|
||||
private FirstrunPane mFirstrunPane;
|
||||
private HomePager mHomePager;
|
||||
|
@ -723,7 +721,7 @@ public class BrowserApp extends GeckoApp
|
|||
}
|
||||
|
||||
if (HardwareUtils.isTablet()) {
|
||||
mTabStrip = (TabStrip) (((ViewStub) findViewById(R.id.new_tablet_tab_strip)).inflate());
|
||||
findViewById(R.id.new_tablet_tab_strip).setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideOnTouchListener());
|
||||
|
@ -1532,10 +1530,6 @@ public class BrowserApp extends GeckoApp
|
|||
mTabsPanel.refresh();
|
||||
}
|
||||
|
||||
if (mTabStrip != null) {
|
||||
mTabStrip.refresh();
|
||||
}
|
||||
|
||||
mBrowserToolbar.refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,10 +128,6 @@ public class TabStrip extends ThemedLinearLayout {
|
|||
}
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
tabStripView.refresh();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLightweightThemeChanged() {
|
||||
final Drawable drawable = getTheme().getDrawable(this);
|
||||
|
|
|
@ -102,7 +102,7 @@ public class TabStripView extends TwoWayView {
|
|||
updateSelectedStyle(selected);
|
||||
|
||||
if (ensureVisible) {
|
||||
ensurePositionIsVisible(selected, true);
|
||||
ensurePositionIsVisible(selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -239,14 +239,10 @@ public class TabStripView extends TwoWayView {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures the tab at the given position is visible. If we are not restoring tabs and
|
||||
* shouldAnimate == true, the tab will animate to be visible, if it is not already visible.
|
||||
*/
|
||||
private void ensurePositionIsVisible(final int position, final boolean shouldAnimate) {
|
||||
private void ensurePositionIsVisible(final int position) {
|
||||
// We just want to move the strip to the right position
|
||||
// when restoring tabs on startup.
|
||||
if (isRestoringTabs || !shouldAnimate) {
|
||||
if (isRestoringTabs) {
|
||||
setSelection(position);
|
||||
return;
|
||||
}
|
||||
|
@ -418,13 +414,6 @@ public class TabStripView extends TwoWayView {
|
|||
drawFadingEdge(canvas);
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
final int selectedPosition = getPositionForSelectedTab();
|
||||
if (selectedPosition != -1) {
|
||||
ensurePositionIsVisible(selectedPosition, false);
|
||||
}
|
||||
}
|
||||
|
||||
private class TabAnimatorListener implements AnimatorListener {
|
||||
private void setLayerType(int layerType) {
|
||||
final int childCount = getChildCount();
|
||||
|
|
Загрузка…
Ссылка в новой задаче