|
|
@ -48,7 +48,6 @@ public class LightningView { |
|
|
|
private static String mDefaultUserAgent; |
|
|
|
private static String mDefaultUserAgent; |
|
|
|
private static Bitmap mWebpageBitmap; |
|
|
|
private static Bitmap mWebpageBitmap; |
|
|
|
private static SharedPreferences mPreferences; |
|
|
|
private static SharedPreferences mPreferences; |
|
|
|
private static boolean mWideViewPort; |
|
|
|
|
|
|
|
private AdBlock mAdBlock; |
|
|
|
private AdBlock mAdBlock; |
|
|
|
private boolean isForegroundTab; |
|
|
|
private boolean isForegroundTab; |
|
|
|
private IntentUtils mIntentUtils; |
|
|
|
private IntentUtils mIntentUtils; |
|
|
@ -143,7 +142,6 @@ public class LightningView { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (mHomepage.startsWith("about:home")) { |
|
|
|
if (mHomepage.startsWith("about:home")) { |
|
|
|
mSettings.setUseWideViewPort(false); |
|
|
|
|
|
|
|
mWebView.loadUrl(getHomepage()); |
|
|
|
mWebView.loadUrl(getHomepage()); |
|
|
|
} else if (mHomepage.startsWith("about:bookmarks")) { |
|
|
|
} else if (mHomepage.startsWith("about:bookmarks")) { |
|
|
|
mBrowserController.openBookmarkPage(mWebView); |
|
|
|
mBrowserController.openBookmarkPage(mWebView); |
|
|
@ -333,7 +331,7 @@ public class LightningView { |
|
|
|
true)); |
|
|
|
true)); |
|
|
|
mSettings.setUseWideViewPort(mPreferences.getBoolean(PreferenceConstants.USE_WIDE_VIEWPORT, |
|
|
|
mSettings.setUseWideViewPort(mPreferences.getBoolean(PreferenceConstants.USE_WIDE_VIEWPORT, |
|
|
|
true)); |
|
|
|
true)); |
|
|
|
mWideViewPort = mPreferences.getBoolean(PreferenceConstants.USE_WIDE_VIEWPORT, true); |
|
|
|
mPreferences.getBoolean(PreferenceConstants.USE_WIDE_VIEWPORT, true); |
|
|
|
mSettings.setLoadWithOverviewMode(mPreferences.getBoolean( |
|
|
|
mSettings.setLoadWithOverviewMode(mPreferences.getBoolean( |
|
|
|
PreferenceConstants.OVERVIEW_MODE, true)); |
|
|
|
PreferenceConstants.OVERVIEW_MODE, true)); |
|
|
|
switch (mPreferences.getInt(PreferenceConstants.TEXT_SIZE, 3)) { |
|
|
|
switch (mPreferences.getInt(PreferenceConstants.TEXT_SIZE, 3)) { |
|
|
@ -721,21 +719,16 @@ public class LightningView { |
|
|
|
if (view.isShown()) { |
|
|
|
if (view.isShown()) { |
|
|
|
view.invalidate(); |
|
|
|
view.invalidate(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (view.getTitle() == null) { |
|
|
|
if (view.getTitle() == null || view.getTitle().isEmpty()) { |
|
|
|
mTitle.setTitle(mActivity.getString(R.string.untitled)); |
|
|
|
mTitle.setTitle(mActivity.getString(R.string.untitled)); |
|
|
|
} else if (!view.getTitle().isEmpty()) { |
|
|
|
|
|
|
|
mTitle.setTitle(view.getTitle()); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
mTitle.setTitle(mActivity.getString(R.string.untitled)); |
|
|
|
mTitle.setTitle(view.getTitle()); |
|
|
|
} |
|
|
|
} |
|
|
|
mBrowserController.update(); |
|
|
|
mBrowserController.update(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onPageStarted(WebView view, String url, Bitmap favicon) { |
|
|
|
public void onPageStarted(WebView view, String url, Bitmap favicon) { |
|
|
|
if (!mSettings.getUseWideViewPort()) { |
|
|
|
|
|
|
|
mSettings.setUseWideViewPort(mWideViewPort); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (isShown()) { |
|
|
|
if (isShown()) { |
|
|
|
mBrowserController.updateUrl(url); |
|
|
|
mBrowserController.updateUrl(url); |
|
|
|
mBrowserController.showActionBar(); |
|
|
|
mBrowserController.showActionBar(); |
|
|
|