mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-14 06:00:21 -05:00
Stop using a custom WebViewClient - it caused keybinding and url-opening bugs.
If anything the new version feels a bit faster
This commit is contained in:
parent
7dcd346e0f
commit
d20fbc09fc
@ -43,7 +43,6 @@ import android.view.View.OnClickListener;
|
|||||||
import android.webkit.CacheManager;
|
import android.webkit.CacheManager;
|
||||||
import android.webkit.UrlInterceptHandler;
|
import android.webkit.UrlInterceptHandler;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.webkit.WebViewClient;
|
|
||||||
import android.webkit.CacheManager.CacheResult;
|
import android.webkit.CacheManager.CacheResult;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@ -381,7 +380,7 @@ public class MessageView extends Activity
|
|||||||
mSubjectView = (TextView)findViewById(R.id.subject);
|
mSubjectView = (TextView)findViewById(R.id.subject);
|
||||||
mDateView = (TextView)findViewById(R.id.date);
|
mDateView = (TextView)findViewById(R.id.date);
|
||||||
mMessageContentView = (WebView)findViewById(R.id.message_content);
|
mMessageContentView = (WebView)findViewById(R.id.message_content);
|
||||||
mMessageContentView.setWebViewClient(new MessageWebViewClient());
|
//mMessageContentView.setWebViewClient(new MessageWebViewClient());
|
||||||
mAttachments = (LinearLayout)findViewById(R.id.attachments);
|
mAttachments = (LinearLayout)findViewById(R.id.attachments);
|
||||||
mAttachmentIcon = findViewById(R.id.attachment);
|
mAttachmentIcon = findViewById(R.id.attachment);
|
||||||
mShowPicturesSection = findViewById(R.id.show_pictures_section);
|
mShowPicturesSection = findViewById(R.id.show_pictures_section);
|
||||||
@ -1203,20 +1202,4 @@ public class MessageView extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MessageWebViewClient extends WebViewClient
|
|
||||||
{
|
|
||||||
|
|
||||||
public boolean shouldOverrideKeyEvent (WebView view, KeyEvent event) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
|
|
||||||
{
|
|
||||||
Log.e(Email.LOG_TAG, "WebView: url '"+failingUrl+"' error "+description);
|
|
||||||
String error = String.format(getString(R.string.message_web_view_error).toString(), description);
|
|
||||||
Toast.makeText(MessageView.this, error, Toast.LENGTH_LONG).show();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user