bug 723305 - Tabs menu uses smoothScrollToPosition(), which doesn't exist in eclair r=mfinkle

This commit is contained in:
Brad Lassey 2012-02-01 19:05:06 -05:00
parent b5e8d84620
commit 268d4fdda4

View File

@ -119,8 +119,13 @@ public class TabsTray extends Activity implements GeckoApp.OnTabsChangedListener
// Scrolling to the selected tab can happen here
if (hasFocus) {
int position = mTabsAdapter.getPositionForTab(Tabs.getInstance().getSelectedTab());
if (position != -1)
if (position == -1)
return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) {
mList.smoothScrollToPosition(position);
} else {
/* To Do: Find a way to scroll with Eclair's APIs */
}
}
}