Updated on 2026-08-14

This commit is contained in:
Tangem 2021-07-23 13:02:20 +03:00
parent fbbd94051a
commit 2abbc1a365
46 changed files with 747 additions and 206 deletions

View file

@ -0,0 +1,21 @@
package com.tangem.tap.common
import android.content.Context
import android.net.Uri
import androidx.browser.customtabs.CustomTabColorSchemeParams
import androidx.browser.customtabs.CustomTabsIntent
import com.tangem.tap.common.extensions.getColorCompat
import com.tangem.wallet.R
class CustomTabsManager {
fun openUrl(url: String, context: Context) {
val customTabsIntent = CustomTabsIntent.Builder()
.setDefaultColorSchemeParams(
CustomTabColorSchemeParams.Builder()
.setNavigationBarColor(context.getColorCompat(R.color.toolbarColor))
.build()
)
.build()
customTabsIntent.launchUrl(context, Uri.parse(url))
}
}