Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaHaddara committed Dec 11, 2024
1 parent c9f8a6f commit e74b747
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ enum class PlaygroundTab(
CORE("Core", Icons.Outlined.Home, Icons.Filled.Home),
UI("UI", Icons.Outlined.Palette, Icons.Filled.Palette),
NETWORK("Network", Icons.Outlined.Language, Icons.Filled.Language),
VIEW_INSTRUMENTATION("Render", Icons.Outlined.Straighten, Icons.Filled.Straighten)
VIEW_INSTRUMENTATION("Render", Icons.Outlined.Straighten, Icons.Filled.Straighten),
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package io.honeycomb.opentelemetry.android.example

import android.content.Intent
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.material3.Button
import androidx.compose.material3.Slider
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
Expand All @@ -18,9 +14,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.honeycomb.opentelemetry.android.example.ui.theme.HoneycombOpenTelemetryAndroidTheme
import java.math.BigDecimal
import java.math.RoundingMode
Expand All @@ -33,14 +27,17 @@ private fun NestedExpensiveView(delayMs: Long) {
}

@Composable
private fun DelayedSlider(delay: Long, onValueChange: (Long) -> Unit) {
private fun DelayedSlider(
delay: Long,
onValueChange: (Long) -> Unit,
) {
val (sliderDelay, setSliderDelay) = remember { mutableFloatStateOf(delay.toFloat()) }
Slider(
value = sliderDelay,
onValueChange = setSliderDelay,
onValueChangeFinished = { onValueChange(sliderDelay.toLong()) },
valueRange = 0f..4000f,
steps = 7
steps = 7,
)
}

Expand Down Expand Up @@ -73,8 +70,8 @@ internal fun ViewInstrumentationPlayground() {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
modifier = Modifier.fillMaxWidth()
){
modifier = Modifier.fillMaxWidth(),
) {
Text(text = "enable slow render")
Switch(checked = enabled, onCheckedChange = setEnabled)
}
Expand Down

0 comments on commit e74b747

Please sign in to comment.