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:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user