Merge pull request #3168 from ByteHamster/about-open-browser
About screen: Open web links in browser
This commit is contained in:
commit
751670a659
|
@ -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;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue