Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke committed Oct 31, 2023
1 parent c26c2b6 commit 8849f1c
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package com.google.android.horologist.composables

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
Expand Down Expand Up @@ -195,7 +194,9 @@ class SectionedListTest : ScreenshotBaseTest(
content: @Composable () -> Unit,
) {
Scaffold(
modifier = Modifier.fillMaxSize(),
modifier = Modifier
.fillMaxSize()
.background(Color.Black),
positionIndicator = {
PositionIndicator(columnState.state)
},
Expand All @@ -206,9 +207,7 @@ class SectionedListTest : ScreenshotBaseTest(
)
},
) {
Box(modifier = Modifier.background(Color.Black)) {
content()
}
content()
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,55 @@

package com.google.android.horologist.screensizes

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.wear.compose.material.PositionIndicator
import androidx.wear.compose.material.Scaffold
import androidx.wear.compose.material.TimeText
import com.google.android.horologist.compose.layout.ScalingLazyColumnDefaults
import com.google.android.horologist.compose.layout.ScalingLazyColumnState
import com.google.android.horologist.compose.layout.scrollAway
import com.google.android.horologist.compose.tools.Device
import com.google.android.horologist.screenshots.FixedTimeSource
import com.google.android.horologist.sectionedlist.SectionedListMenuScreen

class SectionedListTest(device: Device) : ScreenSizeTest(device = device, showTimeText = false) {

@Composable
override fun Content() {
SectionedListMenuScreen(
navigateToRoute = {},
columnState = ScalingLazyColumnDefaults.responsive().create(),
)
val columnState = ScalingLazyColumnDefaults.responsive().create()

SectionedListPreview(columnState) {
SectionedListMenuScreen(
navigateToRoute = {},
columnState = columnState,
)
}
}

@Composable
fun SectionedListPreview(
columnState: ScalingLazyColumnState,
content: @Composable () -> Unit,
) {
Scaffold(
modifier = Modifier
.fillMaxSize()
.background(Color.Black),
positionIndicator = {
PositionIndicator(columnState.state)
},
timeText = {
TimeText(
modifier = Modifier.scrollAway(columnState),
timeSource = FixedTimeSource,
)
},
) {
content()
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8849f1c

Please sign in to comment.