Changed Webviews to Custom Tabs in Nearby Places Dialog, AboutUsActivity (#1185)

* Changed Webviews to Custom Tabs in Nearby Places Dialog, AboutUsActivity

* Created method handleWebUrl in Utils.java
This commit is contained in:
Ujjwal Agrawal 2018-02-25 00:27:49 +05:30 committed by Vivek Maskara
parent a52680d646
commit 96173e26cf
6 changed files with 46 additions and 15 deletions

View file

@ -3,7 +3,9 @@ package fr.free.nrw.commons.nearby;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.customtabs.CustomTabsIntent;
import android.support.v4.app.FragmentActivity;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.PopupMenu;
import android.view.LayoutInflater;
import android.view.MenuItem;
@ -17,6 +19,7 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.Utils;
import fr.free.nrw.commons.location.LatLng;
import fr.free.nrw.commons.ui.widget.OverlayDialog;
import fr.free.nrw.commons.utils.DialogUtil;
@ -141,8 +144,7 @@ public class NearbyInfoDialog extends OverlayDialog {
}
private void openWebView(Uri link) {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, link);
startActivity(browserIntent);
Utils.handleWebUrl(getContext(),link);
}
@OnClick(R.id.emptyLayout)