1 package com.android.mail.browse; 2 3 import android.content.Context; 4 import android.util.AttributeSet; 5 import android.view.MotionEvent; 6 import android.webkit.WebSettings; 7 8 /** 9 * For zooming within a single message. 10 */ 11 public class MessageView extends MailWebView { 12 13 public MessageView(Context c) { 14 this(c, null); 15 } 16 17 public MessageView(Context c, AttributeSet attrs) { 18 super(c, attrs); 19 20 final WebSettings settings = getSettings(); 21 settings.setUseWideViewPort(true); 22 settings.setLoadWithOverviewMode(true); 23 settings.setSupportZoom(true); 24 settings.setBuiltInZoomControls(true); 25 settings.setDisplayZoomControls(false); 26 } 27 28 @Override 29 public boolean onTouchEvent(MotionEvent event) { 30 requestDisallowInterceptTouchEvent(true); 31 return super.onTouchEvent(event); 32 } 33 34 } 35