Sha256: b71a81e28cf3c10a260afb6aee38c30df4c5023144111f691a8313d478862fc9
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
package <%= package_name %>.main import android.webkit.WebView import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment import dev.hotwire.turbo.config.TurboPathConfiguration import <%= package_name %>.features.web.WebFragment import <%= package_name %>.features.web.WebHomeFragment import <%= package_name %>.features.web.WebModalFragment import <%= package_name %>.util.CURRENT_URL_2 import dev.hotwire.turbo.session.TurboSessionNavHostFragment import kotlin.reflect.KClass @Suppress("unused") class TabTwoSessionNavHostFragment : TurboSessionNavHostFragment() { override val sessionName = "main" override val startLocation = CURRENT_URL_2 override val registeredActivities: List<KClass<out AppCompatActivity>> get() = listOf() override val registeredFragments: List<KClass<out Fragment>> get() = listOf(WebFragment::class, WebHomeFragment::class, WebModalFragment::class) override val pathConfigurationLocation: TurboPathConfiguration.Location get() = TurboPathConfiguration.Location(assetFilePath = "json/configuration.json") override fun onSessionCreated() { super.onSessionCreated() session.webView.settings.userAgentString = customUserAgent(session.webView) } private fun customUserAgent(webView: WebView): String { return "Turbo Native Android ${webView.settings.userAgentString}" } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
turbo-native-initializer-0.0.1 | lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/main/TabTwoSessionNavHostFragment.kt.tt |