use of android.support.customtabs.CustomTabsIntent in project XposedInstaller by rovo89.
the class NavUtil method startURL.
public static void startURL(Activity activity, Uri uri) {
if (!XposedApp.getPreferences().getBoolean("chrome_tabs", true)) {
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.putExtra(Browser.EXTRA_APPLICATION_ID, activity.getPackageName());
activity.startActivity(intent);
return;
}
CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
customTabsIntent.setShowTitle(true);
customTabsIntent.setToolbarColor(activity.getResources().getColor(R.color.colorPrimary));
customTabsIntent.build().launchUrl(activity, uri);
}
use of android.support.customtabs.CustomTabsIntent in project actor-platform by actorapp.
the class BaseUrlSpan method buildChromeIntent.
public static CustomTabsIntent buildChromeIntent() {
CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
// Intent sendIntent = new Intent(Intent.ACTION_SEND);
// sendIntent.setType("*/*");
// PendingIntent pi = PendingIntent.getActivity(AndroidContext.getContext() , 0, sendIntent, 0);
Intent actionIntent = new Intent(AndroidContext.getContext(), ChromeCustomTabReceiver.class);
PendingIntent pi = PendingIntent.getBroadcast(AndroidContext.getContext(), 0, actionIntent, 0);
customTabsIntent.setToolbarColor(ActorSDK.sharedActor().style.getMainColor()).setActionButton(BitmapFactory.decodeResource(AndroidContext.getContext().getResources(), R.drawable.ic_share_white_24dp), "Share", pi).setCloseButtonIcon(BitmapFactory.decodeResource(AndroidContext.getContext().getResources(), R.drawable.ic_arrow_back_white_24dp));
return customTabsIntent.build();
}
Aggregations