Sha256: 91c866b4d648b78d065b8acc551ec781915b15cc40d71f8a7476483458023bad
Contents?: true
Size: 1.46 KB
Versions: 8
Compression:
Stored size: 1.46 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.native.NumbersFragment import <%= package_name %>.features.web.WebFragment import <%= package_name %>.features.web.WebHomeFragment import <%= package_name %>.features.web.WebModalFragment import <%= package_name %>.util.CURRENT_URL import dev.hotwire.turbo.session.TurboSessionNavHostFragment import kotlin.reflect.KClass @Suppress("unused") class MainSessionNavHostFragment : TurboSessionNavHostFragment() { override val sessionName = "main" override val startLocation = CURRENT_URL override val registeredActivities: List<KClass<out AppCompatActivity>> get() = listOf() override val registeredFragments: List<KClass<out Fragment>> get() = listOf(WebFragment::class, WebHomeFragment::class, WebModalFragment::class, NumbersFragment::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
8 entries across 8 versions & 1 rubygems