|
|
@ -278,7 +278,11 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
|
|
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
|
|
|
// Unable to create layer for WebViewEx, size 1088x16384 max size 16383 color type 4 has context 1)
|
|
|
|
// java.lang.IllegalStateException: Unable to create layer for WebViewEx, size 768x4864 max size 8192 color type 4 has context 1
|
|
|
|
|
|
|
|
// at android.os.MessageQueue.nativePollOnce(MessageQueue.java:-2)
|
|
|
|
|
|
|
|
// at android.os.MessageQueue.next(MessageQueue.java:326)
|
|
|
|
|
|
|
|
// at android.os.Looper.loop(Looper.java:183)
|
|
|
|
|
|
|
|
// at android.app.ActivityThread.main(ActivityThread.java:7266)
|
|
|
|
if (viewportHeight == 0)
|
|
|
|
if (viewportHeight == 0)
|
|
|
|
heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
|
|
|
heightMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -480,9 +484,6 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int getDefaultViewportHeight(Context context) {
|
|
|
|
static int getDefaultViewportHeight(Context context) {
|
|
|
|
if (true)
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Helper.isGoogle() && Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE /* Android 14 */)
|
|
|
|
if (Helper.isGoogle() && Build.VERSION.SDK_INT > Build.VERSION_CODES.UPSIDE_DOWN_CAKE /* Android 14 */)
|
|
|
|
return DEFAULT_VIEWPORT_HEIGHT * 2;
|
|
|
|
return DEFAULT_VIEWPORT_HEIGHT * 2;
|
|
|
|
else
|
|
|
|
else
|
|
|
|