Disable zoom icons if device supports multitouch

On multitouch devices, the zoom icons are not needed (the user can pinch to
zoom in/out). So, we should disable the display of these icons on multitouch
devices.

bug 3405875

Change-Id: I45484cfc622f11c25d3ea7f4c378c3133d7f7de0
This commit is contained in:
Todd Kennedy 2011-02-28 14:56:42 -08:00
parent fe68c0e7c2
commit da8326dfe7

View File

@ -48,6 +48,7 @@ import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.Loader;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.Bitmap;
@ -319,6 +320,9 @@ public abstract class MessageViewFragmentBase extends Fragment implements View.O
mInviteScroll = view.findViewById(R.id.invite_scroll);
WebSettings webSettings = mMessageContentView.getSettings();
boolean supportMultiTouch = mContext.getPackageManager()
.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH);
webSettings.setDisplayZoomControls(!supportMultiTouch);
webSettings.setSupportZoom(true);
webSettings.setBuiltInZoomControls(true);
mMessageContentView.setWebViewClient(new CustomWebViewClient());