Skip to content

Commit

Permalink
Add scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang committed Apr 4, 2024
1 parent fac15ec commit 7d7af46
Showing 1 changed file with 35 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
Expand Down Expand Up @@ -76,6 +78,7 @@ object DydxTriggerOrderInputView : DydxComponent {
}

val focusManager = LocalFocusManager.current
val scrollState = rememberScrollState()

Column(
modifier = modifier
Expand All @@ -90,36 +93,43 @@ object DydxTriggerOrderInputView : DydxComponent {
) {
HeaderView(modifier = Modifier, state = state)

DydxTriggerOrderReceiptView.Content(
modifier = Modifier,
)
Column(
modifier = Modifier
.fillMaxWidth()
.verticalScroll(scrollState),
verticalArrangement = Arrangement.spacedBy(12.dp),
) {
DydxTriggerOrderReceiptView.Content(
modifier = Modifier,
)

TakeProfitSectionView(
modifier = Modifier,
state = state,
)
TakeProfitSectionView(
modifier = Modifier,
state = state,
)

StopLossSectionView(
modifier = Modifier,
state = state,
)
StopLossSectionView(
modifier = Modifier,
state = state,
)

AdvacedDividerView(
modifier = Modifier,
state = state,
)
AdvacedDividerView(
modifier = Modifier,
state = state,
)

DydxTriggerOrderSizeView.Content(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = ThemeShapes.HorizontalPadding),
)
DydxTriggerOrderSizeView.Content(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = ThemeShapes.HorizontalPadding),
)

DydxTriggerOrderLimitPriceSectionView.Content(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = ThemeShapes.HorizontalPadding),
)
DydxTriggerOrderLimitPriceSectionView.Content(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = ThemeShapes.HorizontalPadding),
)
}

Spacer(modifier = Modifier.weight(1f))

Expand Down

0 comments on commit 7d7af46

Please sign in to comment.