mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1133770 - Use Refreshable interface instead of TabStrip in BrowserApp to allow builds on API 9. r=mhaigh
This commit is contained in:
parent
73ee07b2b6
commit
209a3eb958
@ -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;
|
||||
@ -179,7 +178,8 @@ public class BrowserApp extends GeckoApp
|
||||
public ViewFlipper mActionBarFlipper;
|
||||
public ActionModeCompatView mActionBar;
|
||||
private BrowserToolbar mBrowserToolbar;
|
||||
private TabStrip mTabStrip;
|
||||
// We can't name the TabStrip class because it's not included on API 9.
|
||||
private Refreshable mTabStrip;
|
||||
private ToolbarProgressView mProgressView;
|
||||
private FirstrunPane mFirstrunPane;
|
||||
private HomePager mHomePager;
|
||||
@ -723,7 +723,7 @@ public class BrowserApp extends GeckoApp
|
||||
}
|
||||
|
||||
if (HardwareUtils.isTablet()) {
|
||||
mTabStrip = (TabStrip) (((ViewStub) findViewById(R.id.new_tablet_tab_strip)).inflate());
|
||||
mTabStrip = (Refreshable) (((ViewStub) findViewById(R.id.new_tablet_tab_strip)).inflate());
|
||||
}
|
||||
|
||||
((GeckoApp.MainLayout) mMainLayout).setTouchEventInterceptor(new HideOnTouchListener());
|
||||
@ -3609,4 +3609,8 @@ public class BrowserApp extends GeckoApp
|
||||
appLocale,
|
||||
previousSession);
|
||||
}
|
||||
|
||||
public static interface Refreshable {
|
||||
public void refresh();
|
||||
}
|
||||
}
|
||||
|
@ -15,13 +15,15 @@ import android.view.TouchDelegate;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
|
||||
import org.mozilla.gecko.BrowserApp.Refreshable;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Tab;
|
||||
import org.mozilla.gecko.Tabs;
|
||||
import org.mozilla.gecko.widget.ThemedImageButton;
|
||||
import org.mozilla.gecko.widget.ThemedLinearLayout;
|
||||
|
||||
public class TabStrip extends ThemedLinearLayout {
|
||||
public class TabStrip extends ThemedLinearLayout
|
||||
implements Refreshable {
|
||||
private static final String LOGTAG = "GeckoTabStrip";
|
||||
|
||||
private final TabStripView tabStripView;
|
||||
@ -128,6 +130,7 @@ public class TabStrip extends ThemedLinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refresh() {
|
||||
tabStripView.refresh();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user