diff options
Diffstat (limited to 'org.fox.ttrss/src')
3 files changed, 37 insertions, 3 deletions
diff --git a/org.fox.ttrss/src/main/AndroidManifest.xml b/org.fox.ttrss/src/main/AndroidManifest.xml index 39eaf12e..b3e496e8 100755 --- a/org.fox.ttrss/src/main/AndroidManifest.xml +++ b/org.fox.ttrss/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.fox.ttrss" - android:versionCode="346" - android:versionName="1.120" > + android:versionCode="347" + android:versionName="1.121" > <uses-sdk android:minSdkVersion="15" diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index 86e661ab..d3d60419 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -24,6 +24,7 @@ import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebView.HitTestResult; +import android.webkit.WebViewClient; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.ScrollView; @@ -373,6 +374,22 @@ public class ArticleFragment extends Fragment { m_web = (WebView)view.findViewById(R.id.article_content); + m_web.setWebViewClient(new WebViewClient() { + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + startActivity(intent); + + return true; + + } catch (Exception e){ + e.printStackTrace(); + } + + return false; + } }); + m_web.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java index 82232087..d3bb6c74 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -23,6 +23,7 @@ import android.view.ViewGroup; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebView.HitTestResult; +import android.webkit.WebViewClient; import android.widget.ImageView; import android.widget.ScrollView; import android.widget.TextView; @@ -243,7 +244,23 @@ public class OfflineArticleFragment extends Fragment { final WebView web = (WebView)view.findViewById(R.id.article_content); if (web != null) { - + + web.setWebViewClient(new WebViewClient() { + @Override + public boolean shouldOverrideUrlLoading(WebView view, String url) { + try { + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); + startActivity(intent); + + return true; + + } catch (Exception e){ + e.printStackTrace(); + } + + return false; + } }); + web.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { |