Change double tap toast to long toast.

Change toast count to static to cross all the windows.

It should be --count instead of count--.
This commit is contained in:
Grace Kloba
2009-09-22 10:42:22 -07:00
parent 194099dc4f
commit 24a3ff958b
2 changed files with 7 additions and 5 deletions

View File

@@ -195,7 +195,7 @@ public class WebSettings {
static GoogleLocationSettingManager sGoogleLocationSettingManager;
// private WebSettings, not accessible by the host activity
private int mDoubleTapToastCount = 3;
static private int mDoubleTapToastCount = 3;
private static final String PREF_FILE = "WebViewSettings";
private static final String DOUBLE_TAP_TOAST_COUNT = "double_tap_toast_count";
@@ -1357,8 +1357,10 @@ public class WebSettings {
sGoogleLocationSettingManager.start();
SharedPreferences sp = mContext.getSharedPreferences(PREF_FILE,
Context.MODE_PRIVATE);
mDoubleTapToastCount = sp.getInt(DOUBLE_TAP_TOAST_COUNT,
mDoubleTapToastCount);
if (mDoubleTapToastCount > 0) {
mDoubleTapToastCount = sp.getInt(DOUBLE_TAP_TOAST_COUNT,
mDoubleTapToastCount);
}
nativeSync(frame.mNativeFrame);
mSyncPending = false;
mEventHandler.createHandler();

View File

@@ -3772,10 +3772,10 @@ public class WebView extends AbsoluteLayout
mZoomButtonsController.setVisible(true);
int count = settings.getDoubleTapToastCount();
if (mInZoomOverview && count > 0) {
settings.setDoubleTapToastCount(count--);
settings.setDoubleTapToastCount(--count);
Toast.makeText(mContext,
com.android.internal.R.string.double_tap_toast,
Toast.LENGTH_SHORT).show();
Toast.LENGTH_LONG).show();
}
}
}