diff --git a/src/cheogram/res/anim/slide_in_right.xml b/src/cheogram/res/anim/slide_in_right.xml new file mode 100644 index 000000000..ff9a1ea47 --- /dev/null +++ b/src/cheogram/res/anim/slide_in_right.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/src/cheogram/res/anim/slide_out_left.xml b/src/cheogram/res/anim/slide_out_left.xml new file mode 100644 index 000000000..2dcddafc4 --- /dev/null +++ b/src/cheogram/res/anim/slide_out_left.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/src/monocleschat/java/de/monocles/chat/BrowserHelper.java b/src/monocleschat/java/de/monocles/chat/BrowserHelper.java index b2ec9e247..b7f174080 100644 --- a/src/monocleschat/java/de/monocles/chat/BrowserHelper.java +++ b/src/monocleschat/java/de/monocles/chat/BrowserHelper.java @@ -15,6 +15,8 @@ import java.util.List; import java.util.Set; import androidx.browser.customtabs.CustomTabsIntent; +import eu.siacs.conversations.R; +import eu.siacs.conversations.persistance.FileBackend; import eu.siacs.conversations.ui.XmppActivity; public class BrowserHelper { @@ -78,7 +80,14 @@ public class BrowserHelper { launchNativeBeforeApi30(context, uri); if (!launched) { - var builder = new CustomTabsIntent.Builder().setShowTitle(true); + var builder = new CustomTabsIntent.Builder() + .setShowTitle(true) + .setShareState(CustomTabsIntent.SHARE_STATE_ON) + .setBackgroundInteractionEnabled(true) + .setStartAnimations(context, R.anim.slide_in_right, R.anim.slide_out_left) + .setExitAnimations(context, android.R.anim.slide_in_left, android.R.anim.slide_out_right) + .setCloseButtonIcon(FileBackend.drawDrawable(context.getDrawable(R.drawable.ic_arrow_back_24dp))) + .setCloseButtonPosition(CustomTabsIntent.CLOSE_BUTTON_POSITION_START); if (context instanceof XmppActivity) { builder = builder.setColorScheme(((XmppActivity) context).isDark() ? CustomTabsIntent.COLOR_SCHEME_DARK : CustomTabsIntent.COLOR_SCHEME_LIGHT); }