Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android jetpack compose – Column does not vertically scroll although it was configured to

Posted on November 11, 2022 By

Solution 1 :

It actually works!

For some reason I was trying to use click and drag… which lead me to confusion.

Problem :

I am trying to add scrolling behaviour to a Column by setting verticalScroll(state = rememberScrollState()) modifier.

I checked out some examples in the official compose-jb repository, and it seems that that is the right way to do it, yet in my case the content is not scrollable.

Here the full code:


@Composable
@Preview
fun App() {
    MaterialTheme {
        // add scroll behaviour
        val stateVertical = rememberScrollState(0)
        Column(modifier = Modifier.verticalScroll(state = stateVertical)) {
            repeat(100){
                Text("item: $it")
            }
        }
    }
}

fun main() = application {
    Window(onCloseRequest = ::exitApplication) {
        App()
    }
}

Any ideas why it does not work in my case?

The Column is populated with 100 Text items, more than enough to exceed the default window height.

READ  [FIXED] android app signing - Which option do I need to select before releasing my app to google play?
Powered by Inline Related Posts
Android Tags:android-jetpack-compose

Post navigation

Previous Post: [FIXED] android – Overlapping items in RelativeLayout with ImageView and TextView
Next Post: [FIXED] android – Unable to instantiate application com.company.app.MainApplication: java.lang.ClassNotFoundException React Native Expo

Related Posts

[FIXED] Editext.setSelection with Seekbar Android Android
[FIXED] android – Genymotion Stuck at boot screen Android
[FIXED] c# – Xamarin Forms CollectionView doesn’t show properly Android
[FIXED] How to fetch images from JSON object if imagelink is given as string in android using java and display in listview using ArrayAdapters? Android
[FIXED] linux – Installing packages using android command line tools Android
[FIXED] Launching react-native-navigation screen from Android Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Can VPN be traced by police?
  • Where were Kaiser-Frazer cars built?
  • How do you make gold rose gold paint?
  • What are the newest type of dentures?
  • Can you wear joggers as dress pants?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme