Sha256: 2a33401ddcc013f109b1a037f69f11abb64790514b7cee91c2a803539cbe18fe

Contents?: true

Size: 1.07 KB

Versions: 32

Compression:

Stored size: 1.07 KB

Contents

package <%= package_name %>.features.native

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.Divider
import androidx.compose.material3.ListItem
import androidx.compose.material3.Text
import dev.hotwire.turbo.nav.TurboNavGraphDestination
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview

@TurboNavGraphDestination(uri = "turbo://fragment/numbers")
class NumbersFragment : NativeFragment() {
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        return setContent(inflater, container) {
            NumbersList()
        }
    }
}

@Composable
fun NumbersList() {
    val numbers = 1..100

    LazyColumn {
        items(numbers.count()) { index ->
            ListItem(headlineContent = { Text("Row ${index + 1}") })
            Divider()
        }
    }
}

@Preview
@Composable
fun PreviewNumbersList() {
    NumbersList()
}

Version data entries

32 entries across 16 versions & 1 rubygems

Version Path
turbo-native-initializer-0.0.19 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.19 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.18 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.18 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.17 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.17 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.16 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.16 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.15 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.15 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.14 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.14 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.13 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.13 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.12 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.12 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.11 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.11 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.10 lib/turbo_native_initializer/templates/android_stack/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt
turbo-native-initializer-0.0.10 lib/turbo_native_initializer/templates/android_tabs/app/src/main/java/dev/hotwire/turbo/turbonativeproject/features/native/NumbersFragment.kt.tt