Skip to content

Commit

Permalink
sample: Display a list of swipeable items
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Feb 3, 2024
1 parent c7553b1 commit 49b9422
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sample/src/main/kotlin/me/saket/swipe/sample/SampleActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -72,9 +74,13 @@ class SampleActivity : AppCompatActivity() {
TopAppBar(title = { Text(stringResource(R.string.app_name)) })
}
) { contentPadding ->
SwipeableBoxPreview(
Modifier.padding(contentPadding)
)
LazyColumn(Modifier.padding(contentPadding).fillMaxSize()) {
items(20) { index ->
SwipeableBoxPreview(
Modifier.fillMaxWidth()
)
}
}
}
}
}
Expand Down

0 comments on commit 49b9422

Please sign in to comment.