mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
* AboutActivity links now open with the in-app tabbed browser. * UploadActivity license and policy links now open with the in-app tabbed browser.
This commit is contained in:
parent
af291a5fcc
commit
55113b3018
2 changed files with 55 additions and 7 deletions
|
|
@ -188,6 +188,7 @@ public class Utils {
|
|||
}
|
||||
|
||||
/**
|
||||
* Opens Custom Tab Activity with in-app browser for the specified URL.
|
||||
* Launches intent for web URL
|
||||
* @param context
|
||||
* @param url
|
||||
|
|
@ -206,7 +207,8 @@ public class Utils {
|
|||
builder.setSecondaryToolbarColor(ContextCompat.getColor(context, R.color.primaryDarkColor));
|
||||
builder.setExitAnimations(context, android.R.anim.slide_in_left, android.R.anim.slide_out_right);
|
||||
CustomTabsIntent customTabsIntent = builder.build();
|
||||
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
// Clear previous browser tasks, so that back/exit buttons work as intended.
|
||||
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
customTabsIntent.launchUrl(context, url);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue