Add ColorInt annotation

Change-Id: If6ea8e4c3a09c6de932797ddcb64bbfff1e52ede
pull/465/head
Caren 2 years ago
parent 94e2bb0ec2
commit 1280565466

@ -18,6 +18,7 @@ package com.google.samples.apps.nowinandroid.core.ui
import android.content.Context import android.content.Context
import android.net.Uri import android.net.Uri
import androidx.annotation.ColorInt
import androidx.browser.customtabs.CustomTabColorSchemeParams import androidx.browser.customtabs.CustomTabColorSchemeParams
import androidx.browser.customtabs.CustomTabsIntent import androidx.browser.customtabs.CustomTabsIntent
import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.foundation.lazy.LazyListScope
@ -73,7 +74,7 @@ fun LazyGridScope.newsFeed(
} }
} }
fun launchCustomChromeTab(context: Context, uri: Uri, toolbarColor: Int) { fun launchCustomChromeTab(context: Context, uri: Uri, @ColorInt toolbarColor: Int) {
val customTabBarColor = CustomTabColorSchemeParams.Builder() val customTabBarColor = CustomTabColorSchemeParams.Builder()
.setToolbarColor(toolbarColor).build() .setToolbarColor(toolbarColor).build()
val customTabsIntent = CustomTabsIntent.Builder() val customTabsIntent = CustomTabsIntent.Builder()

Loading…
Cancel
Save