Open web links in browser

This commit is contained in:
ByteHamster 2019-05-07 17:56:35 +02:00
parent c6e81391b2
commit df395ea388

View File

@ -1,7 +1,9 @@
package de.danoeh.antennapod.activity;
import android.content.Intent;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
@ -54,12 +56,15 @@ public class AboutActivity extends AppCompatActivity {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (!url.startsWith("http")) {
if (url.startsWith("http")) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(browserIntent);
return true;
} else {
url = url.replace("file:///android_asset/", "");
loadAsset(url);
return true;
}
return false;
}
});