Sha256: 0a3c9dec71315b1e34f2ff3642fc71fb9acdd7fabad46fee4cd6d68f35ce9ebe
Contents?: true
Size: 1.63 KB
Versions: 8
Compression:
Stored size: 1.63 KB
Contents
package <%= package_name %>.features.web import android.os.Bundle import android.view.View import dev.hotwire.strada.BridgeDelegate import <%= package_name %>.base.NavDestination import dev.hotwire.turbo.fragments.TurboWebFragment import dev.hotwire.turbo.nav.TurboNavGraphDestination import <%= package_name %>.R import <%= package_name %>.strada.bridgeComponentFactories import dev.hotwire.turbo.views.TurboWebView @TurboNavGraphDestination(uri = "turbo://fragment/web") open class WebFragment : TurboWebFragment(), NavDestination { private val bridgeDelegate by lazy { BridgeDelegate( location = location, destination = this, componentFactories = bridgeComponentFactories ) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) viewLifecycleOwner.lifecycle.addObserver(bridgeDelegate) } override fun onDestroyView() { super.onDestroyView() viewLifecycleOwner.lifecycle.removeObserver(bridgeDelegate) } override fun onColdBootPageStarted(location: String) { bridgeDelegate.onColdBootPageStarted() } override fun onColdBootPageCompleted(location: String) { bridgeDelegate.onColdBootPageCompleted() } override fun onWebViewAttached(webView: TurboWebView) { bridgeDelegate.onWebViewAttached(webView) } override fun onWebViewDetached(webView: TurboWebView) { bridgeDelegate.onWebViewDetached() } override fun createErrorView(statusCode: Int): View { return layoutInflater.inflate(R.layout.error_web, null) } }
Version data entries
8 entries across 8 versions & 1 rubygems