|
|
@ -5,11 +5,17 @@ import androidx.compose.foundation.background |
|
|
|
import androidx.compose.foundation.ExperimentalFoundationApi |
|
|
|
import androidx.compose.foundation.ExperimentalFoundationApi |
|
|
|
import androidx.compose.foundation.lazy.LazyColumn |
|
|
|
import androidx.compose.foundation.lazy.LazyColumn |
|
|
|
import androidx.compose.foundation.lazy.rememberLazyListState |
|
|
|
import androidx.compose.foundation.lazy.rememberLazyListState |
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.Box |
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.fillMaxWidth |
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.fillMaxHeight |
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.fillMaxSize |
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.height |
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.padding |
|
|
|
|
|
|
|
import androidx.compose.foundation.layout.Spacer |
|
|
|
import androidx.compose.foundation.rememberScrollbarAdapter |
|
|
|
import androidx.compose.foundation.rememberScrollbarAdapter |
|
|
|
import androidx.compose.foundation.Text |
|
|
|
|
|
|
|
import androidx.compose.foundation.VerticalScrollbar |
|
|
|
import androidx.compose.foundation.VerticalScrollbar |
|
|
|
|
|
|
|
import androidx.compose.material.Text |
|
|
|
import androidx.compose.material.MaterialTheme |
|
|
|
import androidx.compose.material.MaterialTheme |
|
|
|
import androidx.compose.foundation.layout.* |
|
|
|
|
|
|
|
import androidx.compose.runtime.Composable |
|
|
|
import androidx.compose.runtime.Composable |
|
|
|
import androidx.compose.ui.Alignment |
|
|
|
import androidx.compose.ui.Alignment |
|
|
|
import androidx.compose.ui.graphics.Color |
|
|
|
import androidx.compose.ui.graphics.Color |
|
|
@ -31,7 +37,7 @@ fun LazyScrollable() { |
|
|
|
val itemCount = 100 |
|
|
|
val itemCount = 100 |
|
|
|
|
|
|
|
|
|
|
|
LazyColumn(Modifier.fillMaxSize().padding(end = 12.dp), state) { |
|
|
|
LazyColumn(Modifier.fillMaxSize().padding(end = 12.dp), state) { |
|
|
|
items((1..itemCount).toList()) { x -> |
|
|
|
items(itemCount) { x -> |
|
|
|
TextBox("Item in ScrollableColumn #$x") |
|
|
|
TextBox("Item in ScrollableColumn #$x") |
|
|
|
Spacer(modifier = Modifier.height(5.dp)) |
|
|
|
Spacer(modifier = Modifier.height(5.dp)) |
|
|
|
} |
|
|
|
} |
|
|
|